$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml islandora_csl/
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\islandora_csl\islandora_csl.info.yml
-------------------------------------------------------------------------------------------
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: C:\xampp\htdocs\contribution\web\modules\contrib\islandora_csl\islandora_csl.module
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 6 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
15 | WARNING | [x] Unused use statement
37 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
39 | WARNING | [x] A comma should follow the last multiline array item. Found: 'islandora_object'
40 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
63 | WARNING | [x] 'TODO: if you want other bundles than islandora object, check that here' should match the format '@todo Fix problem X here.'
63 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\islandora_csl\src\Encoder\CslEncoder.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 1 WARNING AFFECTING 12 LINES
------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
7 | ERROR | [x] Each PHP statement must be on a line by itself
26 | ERROR | [x] Expected 1 blank line after function; 2 found
35 | ERROR | [x] Inline control structures are not allowed
39 | ERROR | [x] Case breaking statements must be followed by a single blank line
45 | ERROR | [x] Inline comments must start with a capital letter
46 | WARNING | [x] 'TODO: improve' should match the format '@todo Fix problem X here.'
46 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
62 | ERROR | [x] Case breaking statements must be followed by a single blank line
65 | ERROR | [x] Inline control structures are not allowed
66 | ERROR | [x] Case breaking statements must be followed by a single blank line
71 | ERROR | [x] Case breaking statements must be followed by a single blank line
84 | ERROR | [x] Expected 1 blank line after function; 0 found
85 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
Time: 230ms; Memory: 8MB
SI-001@DESKTOP-M7JUPOF MINGW64 /c/xampp/htdocs/contribution/web/modules/contrib
$ phpcs --standard=Drupalpractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml islandora_csl/
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\islandora_csl\islandora_csl.info.yml
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
1 | WARNING | "Description" property is missing in the info.yml file
-------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\islandora_csl\src\Encoder\CslEncoder.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------
42 | WARNING | Term::load calls should be avoided in classes, use dependency injection instead
64 | WARNING | Term::load calls should be avoided in classes, use dependency injection instead
74 | WARNING | Node::load calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------
Time: 196ms; Memory: 6MB
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | phpcs_drupal_standard_and_drupal_practice_standard_issue-3285346-1.patch | 4.55 KB | rakhi soni |
Issue fork islandora_csl-3285346
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3285346-phpcs---standarddrupal-and
changes, plain diff MR !1
Comments
Comment #2
rakhi soni commentedI have created a patch to fix the issue "phpcs --standard=Drupal AND phpcs --standard=Drupalpractice issues" please review.
Comment #7
joecorall commentedThank you for the patch! The code formatting changes have been applied.