The report is below after running

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,yml .

Report:

FILE: ./radix/Commands/radix/SubThemeCommands.php
---------------------------------------------------------------------------------------------------
FOUND 24 ERRORS AND 2 WARNINGS AFFECTING 24 LINES
---------------------------------------------------------------------------------------------------
  23 | ERROR   | [x] Missing class doc comment
  29 | ERROR   | [ ] Missing short description in doc comment
  34 | ERROR   | [ ] Missing short description in doc comment
  92 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
  94 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 147 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
 214 | ERROR   | [ ] Missing short description in doc comment
 219 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 249 | ERROR   | [ ] Missing short description in doc comment
 252 | ERROR   | [ ] Description for the @return value is missing
 270 | ERROR   | [x] Missing function doc comment
 270 | ERROR   | [x] Expected 1 space between comma and type hint "string"; 2 found
 270 | ERROR   | [x] Expected one space after the comma, 2 found
 283 | ERROR   | [ ] Missing short description in doc comment
 302 | ERROR   | [x] Missing function doc comment
 322 | ERROR   | [x] Missing function doc comment
 326 | ERROR   | [x] Missing function doc comment
 333 | ERROR   | [ ] Missing short description in doc comment
 334 | ERROR   | [ ] Missing parameter comment
 352 | ERROR   | [x] Missing function doc comment
 356 | ERROR   | [x] Missing function doc comment
 364 | ERROR   | [x] Missing function doc comment
 368 | ERROR   | [x] Missing function doc comment
 372 | ERROR   | [x] Missing function doc comment
 378 | ERROR   | [x] Missing function doc comment
 382 | ERROR   | [x] Missing function doc comment
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------


FILE: ./radix/includes/view.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/includes/form.inc
------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 19 | ERROR | [x] Expected 1 blank line after function; 0 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: ./radix/includes/block.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------
 53 | ERROR | [x] Short array syntax must be used to define arrays
 53 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./radix/includes/field.inc
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
 34 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------


FILE: ./radix/includes/suggestions.inc
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
  6 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for
    |         |     xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
 21 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for
    |         |     xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: ./radix/includes/menu.inc
------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 15 | ERROR | [x] Whitespace found at end of line
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: ./radix/src/kits/default/default.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/view.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/form.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/theme.inc
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
 6 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/block.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/comment.inc
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/field.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/user.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/menu.inc
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/kits/default/includes/content.inc
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------


FILE: ./radix/src/kits/default/default.theme
-----------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
 4 | ERROR | [x] Doc comment short description must end with a full stop
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------


FILE: ./radix/src/SubThemeGenerator.php
--------------------------------------------------------------------------------------
FOUND 30 ERRORS AFFECTING 30 LINES
--------------------------------------------------------------------------------------
  11 | ERROR | [x] Missing class doc comment
  13 | ERROR | [ ] Missing short description in doc comment
  18 | ERROR | [ ] Missing short description in doc comment
  23 | ERROR | [ ] Missing short description in doc comment
  28 | ERROR | [ ] Missing short description in doc comment
  33 | ERROR | [x] Missing function doc comment
  37 | ERROR | [ ] Missing short description in doc comment
  49 | ERROR | [ ] Missing short description in doc comment
  54 | ERROR | [x] Missing function doc comment
  62 | ERROR | [x] Missing function doc comment
  68 | ERROR | [ ] Missing short description in doc comment
  73 | ERROR | [x] Missing function doc comment
  77 | ERROR | [ ] Missing short description in doc comment
  86 | ERROR | [ ] Missing member variable doc comment
  88 | ERROR | [x] Missing function doc comment
  92 | ERROR | [x] Missing function doc comment
  98 | ERROR | [x] Missing function doc comment
 103 | ERROR | [ ] Missing short description in doc comment
 113 | ERROR | [ ] Missing short description in doc comment
 125 | ERROR | [ ] Missing short description in doc comment
 137 | ERROR | [ ] Missing short description in doc comment
 153 | ERROR | [ ] Missing short description in doc comment
 169 | ERROR | [ ] Missing short description in doc comment
 170 | ERROR | [ ] Description for the @return value is missing
 177 | ERROR | [ ] Missing short description in doc comment
 178 | ERROR | [ ] Description for the @return value is missing
 189 | ERROR | [ ] Missing short description in doc comment
 190 | ERROR | [ ] Description for the @return value is missing
 192 | ERROR | [x] Visibility must be declared on method "getFilesToMakeReplacements"
 196 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------


FILE: ./radix/radix.drush.inc
--------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 2 WARNINGS AFFECTING 18 LINES
--------------------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
  13 | ERROR   | [x] Short array syntax must be used to define arrays
  15 | ERROR   | [x] Short array syntax must be used to define arrays
  17 | ERROR   | [x] Short array syntax must be used to define arrays
  20 | ERROR   | [x] Short array syntax must be used to define arrays
  26 | ERROR   | [x] Short array syntax must be used to define arrays
  41 | ERROR   | [x] Case breaking statements must be followed by a single blank line
  42 | WARNING | [ ] Code after the RETURN statement on line 41 cannot be executed
  70 | ERROR   | [x] Short array syntax must be used to define arrays
  71 | ERROR   | [x] Comments may not appear after statements
  72 | ERROR   | [x] Expected one space after the comma, 3 found
  72 | ERROR   | [x] Comments may not appear after statements
 106 | ERROR   | [x] Short array syntax must be used to define arrays
 127 | ERROR   | [x] Short array syntax must be used to define arrays
 132 | ERROR   | [x] Short array syntax must be used to define arrays
 139 | WARNING | [ ] Line exceeds 80 characters; contains 90 characters
 146 | ERROR   | [x] Short array syntax must be used to define arrays
 164 | ERROR   | [x] Short array syntax must be used to define arrays
 186 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------


FILE: ./radix/radix.theme
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
 1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------

Time: 592ms; Memory: 12MB

Comments

kburakozdemir created an issue. See original summary.

kburakozdemir’s picture

StatusFileSize
new20.68 KB

The report is below after running

phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,yml .
PHPCBF RESULT SUMMARY
---------------------------------------------------------------------------------------------
FILE                                                                         FIXED  REMAINING
---------------------------------------------------------------------------------------------
./radix/Commands/radix/SubThemeCommands.php       16     22
./radix/includes/view.inc                         1      0
./radix/includes/form.inc                         2      0
./radix/includes/block.inc                        2      0
./radix/includes/field.inc                        1      0
./radix/includes/suggestions.inc                  1      3
./radix/includes/menu.inc                         2      0
./radix/src/kits/default/includes/view.inc        1      0
./radix/src/kits/default/includes/form.inc        1      0
./radix/src/kits/default/includes/theme.inc       1      0
./radix/src/kits/default/includes/block.inc       1      0
./radix/src/kits/default/includes/comment.inc     1      0
./radix/src/kits/default/includes/field.inc       1      0
./radix/src/kits/default/includes/user.inc        1      0
./radix/src/kits/default/includes/menu.inc        1      0
./radix/src/kits/default/includes/content.inc     1      0
./radix/src/kits/default/default.theme            2      0
./radix/src/SubThemeGenerator.php                 10     29
./radix/radix.drush.inc                           17     2
./radix/radix.theme                               1      0
---------------------------------------------------------------------------------------------
A TOTAL OF 64 ERRORS WERE FIXED IN 20 FILES
---------------------------------------------------------------------------------------------

Time: 2.63 secs; Memory: 14MB

After the patch the report is like this:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,yml .

FILE:./radix/Commands/radix/SubThemeCommands.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
  99 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 154 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------


FILE:./radix/src/kits/default/default.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------


FILE: ./radix/radix.drush.inc
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-------------------------------------------------------------------------------
  44 | WARNING | Code after the RETURN statement on line 42 cannot be executed
 143 | WARNING | Line exceeds 80 characters; contains 90 characters
-------------------------------------------------------------------------------

Time: 616ms; Memory: 12MB
kburakozdemir’s picture

StatusFileSize
new20.68 KB

The same file as #2. The file name is corrected.

kburakozdemir’s picture

Status: Active » Needs review
lexsoft’s picture

+1 for this

  • ckng committed 6a77adc on 8.x-4.x
    Issue #3169302 by kburakozdemir, ckng: Coding standards
    
ckng’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.