Problem/Motivation
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .
FILE: .../web/modules/custom/svg_image/modules/svg_image_responsive/svg_image_responsive.module
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
4 | ERROR | [x] Function comment short description must start with exactly one space
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------
FILE: /home/aly/www/contribution/web/modules/custom/svg_image/modules/svg_image_responsive/src/Plugin/Field/FieldFormatter/SvgResponsiveImageFormatter.php
----------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------
193 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
193 | ERROR | [x] Each index in a multi-line array must be on a new line
194 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
----------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/aly/www/contribution/web/modules/custom/svg_image/README.md
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------
14 | WARNING | Line exceeds 80 characters; contains 114 characters
16 | WARNING | Line exceeds 80 characters; contains 122 characters
37 | WARNING | Line exceeds 80 characters; contains 95 characters
42 | WARNING | Line exceeds 80 characters; contains 83 characters
43 | WARNING | Line exceeds 80 characters; contains 106 characters
-----------------------------------------------------------------------
FILE: /home/aly/www/contribution/web/modules/custom/svg_image/src/Plugin/Field/FieldWidget/SvgImageWidget.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
189 | ERROR | [ ] The array declaration extends to column 141 (the limit is 80). The array content should be split up over multiple lines
195 | ERROR | [x] Use null coalesce operator instead of ternary operator.
292 | ERROR | [x] Use null coalesce operator instead of ternary operator.
299 | ERROR | [ ] The array declaration extends to column 116 (the limit is 80). The array content should be split up over multiple lines
299 | ERROR | [ ] The array declaration extends to column 115 (the limit is 80). The array content should be split up over multiple lines
304 | ERROR | [x] Use null coalesce operator instead of ternary operator.
310 | ERROR | [ ] The array declaration extends to column 118 (the limit is 80). The array content should be split up over multiple lines
310 | ERROR | [ ] The array declaration extends to column 117 (the limit is 80). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/aly/www/contribution/web/modules/custom/svg_image/src/Plugin/Field/FieldFormatter/SvgImageFormatter.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------
48 | ERROR | [ ] Variable "ImageStyleStorage" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
49 | ERROR | [ ] Variable "ImageStyleStorage" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
151 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over multiple lines
186 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
186 | ERROR | [x] Each index in a multi-line array must be on a new line
187 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
243 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------
FILE: /home/aly/www/contribution/web/modules/custom/svg_image/svg_image.install
-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------
Steps to reproduce
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes