Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/entity_pdf/config/install/entity_pdf.settings.yml
-------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------
2 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/entity_pdf.module
------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------
28 | WARNING | [x] '@todo: This should be removed once
https://www.drupal.org/project/drupal/issues/2282159
✨
Template theme hook suggestions for Fields do not include ViewModes
Needs work
' should match the format '@todo Fix problem X here.'
51 | ERROR | [x] Concat operator must be surrounded by a single space
59 | WARNING | [x] '@todo: remove it before going to stable release and inform in release notes' should match the format '@todo Fix problem X here.'
------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/entity_pdf.install
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
13 | ERROR | [x] Doc comment short description must end with a full stop
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/src/Form/EntityPdfSettingsForm.php
---------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin with a file doc comment
5 | ERROR | [x] Doc comment short description must end with a full stop
13 | ERROR | [x] Doc comment short description must end with a full stop
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
43 | WARNING | [x] A comma should follow the last multiline array item. Found: )
50 | WARNING | [x] A comma should follow the last multiline array item. Found: )
65 | ERROR | [x] Expected 1 blank line after function; 0 found
66 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/src/Plugin/DsField/Node/NodePDFLink.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------
12 | WARNING | [x] '@todo: make this more generic so it can work with any entity.' should match the format '@todo Fix problem X here.'
30 | WARNING | [x] '@todo: dependency injection.' should match the format '@todo Fix problem X here.'
73 | WARNING | [x] '@todo: dependency injection.' should match the format '@todo Fix problem X here.'
83 | ERROR | [x] Each PHP statement must be on a line by itself
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/src/Permissions/EnitytPdfPermissions.php
---------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
---------------------------------------------------------------------------------------
11 | ERROR | [x] Missing class doc comment
54 | ERROR | [x] There should be no white space after an opening "["
54 | ERROR | [x] There should be no white space before a closing "]"
55 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/entity_pdf/src/Controller/PdfEntityController.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------------
36 | WARNING | [x] There must be no blank line following an inline comment
36 | WARNING | [ ] There must be no blank line following an inline comment
36 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
41 | ERROR | [x] There should be no white space after an opening "["
41 | ERROR | [x] There should be no white space before a closing "]"
54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
77 | ERROR | [ ] Parameter $entity is not described in comment
77 | ERROR | [ ] Parameter $view_mode is not described in comment
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
Time: 1.12 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/entity_pdf/
Proposed resolution
Above error/warnings need to be fixed.