Problem/Motivation
Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md panopoly_images reports the following issues that should be fixed.
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.install
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
4 | 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."
4 | ERROR | [x] Doc comment short description must end with a full stop
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.module
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 13 ERRORS AND 11 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | ERROR | [x] "include_once" is a statement not a function; no parentheses are required
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."
10 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
10 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
11 | WARNING | [ ] Do not use drupal_add_css() in hook_init(), use #attached for CSS and JS in your page/form callback or in hook_page_build() instead
14 | ERROR | [x] Expected 1 space after IF keyword; 0 found
18 | WARNING | [ ] Do not use drupal_add_js() in hook_init(), use #attached for CSS and JS in your page/form callback or in hook_page_build() instead
18 | ERROR | [ ] The array declaration extends to column 156 (the limit is 80). The array content should be split up over multiple lines
27 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
47 | 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."
51 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
65 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
73 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
78 | WARNING | [ ] Line exceeds 80 characters; contains 93 characters
79 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
86 | ERROR | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
94 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
101 | 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."
103 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
145 | 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."
180 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
181 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
190 | 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 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/PATCHES.txt
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
4 | WARNING | Line exceeds 80 characters; contains 86 characters
--------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly-images.css
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
81 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.features.defaultconfig.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: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.features.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: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.info
-----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
1 | ERROR | Duplicate entry for "core" in info file
1 | ERROR | Duplicate entry for "project" in info file
-----------------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/CHANGELOG.txt
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
295 | WARNING | Line exceeds 80 characters; contains 83 characters
299 | WARNING | Line exceeds 80 characters; contains 110 characters
339 | WARNING | Line exceeds 80 characters; contains 85 characters
----------------------------------------------------------------------------------------------------------------------
FILE: /Users/vimalnadar/www/Travelopia/domino-leboat/docroot/profiles/d2/modules/contrib/panopoly_images/panopoly_images.file_default_displays.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
--------------------------------------------------------------------------------------------------------------------------------------------------
Time: 112ms; Memory: 10MB
Steps to reproduce
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md panopoly_images
Proposed resolution
Fix all the above issues reported by phpcs