$ 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

Command icon 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:

Comments

Rakhi Soni created an issue. See original summary.

rakhi soni’s picture

Assigned: rakhi soni » Unassigned
Status: Active » Needs review
StatusFileSize
new4.55 KB

I have created a patch to fix the issue "phpcs --standard=Drupal AND phpcs --standard=Drupalpractice issues" please review.

joecorall made their first commit to this issue’s fork.

  • joecorall committed 98b08b7 on 1.0.x authored by Rakhi Soni
    Issue #3285346 by Rakhi Soni, joecorall: phpcs --standard=Drupal AND...

joecorall’s picture

Status: Needs review » Fixed

Thank you for the patch! The code formatting changes have been applied.

Status: Fixed » Closed (fixed)

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