PHPCS Coding standard

Created on 24 December 2022, almost 2 years ago
Updated 20 August 2024, 4 months ago

Problem/Motivation

FILE: ...upal8/web/modules/dwr/src/Plugin/Field/FieldWidget/DateWeekRangeWidget.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
 221 | ERROR   | [x] Expected 1 space after FUNCTION keyword; 0 found
 222 | WARNING | [ ] Only string literals should be passed to t() where
     |         |     possible
 238 | WARNING | [ ] Only string literals should be passed to t() where
     |         |     possible
 242 | ERROR   | [x] Expected 1 blank line after function; 0 found
 243 | ERROR   | [x] The closing brace for the class must have an empty line
     |         |     before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/dwr/jquery.ui/themes/base/datepicker.css
--------------------------------------------------------------------------------
FOUND 170 ERRORS AFFECTING 85 LINES
--------------------------------------------------------------------------------
  12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  13 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  18 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  29 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  45 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  45 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  46 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  48 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  53 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  53 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  54 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  54 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  59 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  59 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  63 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  63 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  67 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  67 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  68 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  68 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  69 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  69 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  72 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  72 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  73 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  74 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  75 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  78 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  78 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  79 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  79 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  83 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  83 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  84 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  84 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  85 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  85 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  86 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  86 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  89 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  89 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  91 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  92 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  92 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  98 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  98 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  99 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  99 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 100 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 100 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 101 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 101 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 102 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 105 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 110 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 110 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 113 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 116 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 116 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 117 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 117 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 120 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 120 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 123 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 123 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 126 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 126 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 130 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 130 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 133 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 133 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 136 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 136 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 137 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 138 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 138 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 143 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 143 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 146 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 146 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 147 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 147 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 150 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 150 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 151 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 151 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 154 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 154 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 155 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 155 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 158 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 158 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 159 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 159 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 162 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 162 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 165 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 165 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 169 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 169 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 173 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 173 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 174 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 174 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 179 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 179 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 180 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 180 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 181 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 181 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 182 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 182 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 183 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 183 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 184 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 184 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 170 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/dwr/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 26 | WARNING | Line exceeds 80 characters; contains 81 characters
 29 | WARNING | Line exceeds 80 characters; contains 86 characters
----------------------------------------------------------------------


FILE: /var/www/html/drupal8/web/modules/dwr/CHANGELOG.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 7 | WARNING | Line exceeds 80 characters; contains 214 characters
----------------------------------------------------------------------

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @Neerj333,

    I applied patch #2, it was applied smoothly and fixed most of the phpcs issues.

    These are the remaining issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml:

    āžœ  dwr git:(8.x-1.x) curl https://www.drupal.org/files/issues/2022-12-24/fix_coding_standard-3329115-2.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7836  100  7836    0     0  22818      0 --:--:-- --:--:-- --:--:-- 22912
    patching file CHANGELOG.txt
    patching file README.md
    patching file jquery.ui/themes/base/datepicker.css
    patching file src/Plugin/Field/FieldWidget/DateWeekRangeWidget.php
    āžœ  dwr git:(8.x-1.x) āœ— ..
    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml dwr
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/dwr/src/Plugin/Field/FieldWidget/DateWeekRangeWidget.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------------------------
     222 | WARNING | Only string literals should be passed to t() where possible
     238 | WARNING | Only string literals should be passed to t() where possible
    -----------------------------------------------------------------------------------------------------------------------------
    
    Time: 164ms; Memory: 10MB
    
    āžœ  contrib

    Thank you.

Production build 0.71.5 2024