Problem/Motivation
command -:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/liveness/
FILE: /var/www/html/d10/web/modules/contrib/liveness/README.md
------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------
4 | WARNING | [ ] Line exceeds 80 characters; contains 142 characters
20 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
23 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/config/schema/liveness.schema.yml
--------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------
22 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/liveness.permissions.yml
-----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------
4 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/liveness.links.task.yml
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/liveness.routing.yml
-------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/liveness.links.action.yml
------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/src/Controller/LivenessController.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 11 LINES
------------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
9 | ERROR | [x] Missing class doc comment
11 | ERROR | [x] Missing function doc comment
19 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
25 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
35 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
40 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
43 | ERROR | [x] Expected newline after closing brace
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
56 | ERROR | [x] Expected 1 blank line after function; 0 found
57 | ERROR | [x] Expected 1 newline at end of file; 2 found
57 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/src/Commands/LivenessCommands.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 18 ERRORS AND 12 WARNINGS AFFECTING 23 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
24 | ERROR | [x] Expected newline after closing brace
25 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
46 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
47 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
47 | ERROR | [x] Comments may not appear after statements
47 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
50 | ERROR | [x] Expected newline after closing brace
53 | ERROR | [x] Expected newline after closing brace
55 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
59 | ERROR | [x] Expected newline after closing brace
61 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
86 | WARNING | [ ] There must be no blank line following an inline comment
86 | ERROR | [x] Comments may not appear after statements
86 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
88 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
91 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
92 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
92 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split up over multiple lines
114 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
115 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
129 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
136 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
137 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
137 | ERROR | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up over multiple lines
140 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
145 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
148 | ERROR | [x] Expected 1 blank line after function; 0 found
149 | ERROR | [x] Expected 1 newline at end of file; 2 found
149 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/src/Plugin/Block/LivenessBlock.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 5 WARNINGS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
22 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
35 | WARNING | [ ] Line exceeds 80 characters; contains 95 characters
35 | WARNING | [ ] There must be no blank line following an inline comment
35 | ERROR | [x] Comments may not appear after statements
35 | 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 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
41 | ERROR | [x] Comments may not appear after statements
41 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
58 | ERROR | [x] Comments may not appear after statements
61 | ERROR | [x] Expected 1 blank line after function; 0 found
62 | ERROR | [x] Expected 1 newline at end of file; 2 found
62 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/src/Form/LivenessSettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 19 ERRORS AND 1 WARNING AFFECTING 19 LINES
-------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Missing function doc comment
14 | ERROR | [x] Missing function doc comment
18 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
25 | ERROR | [x] Expected newline after closing brace
74 | ERROR | [x] Use null coalesce operator instead of ternary operator.
80 | ERROR | [x] Use null coalesce operator instead of ternary operator.
86 | ERROR | [x] Use null coalesce operator instead of ternary operator.
119 | ERROR | [x] Missing function doc comment
125 | ERROR | [x] Missing function doc comment
129 | ERROR | [x] Missing function doc comment
137 | ERROR | [x] Missing function doc comment
141 | ERROR | [x] Missing function doc comment
145 | WARNING | [ ] Unused variable $key.
163 | ERROR | [x] Missing function doc comment
170 | ERROR | [x] Expected newline after closing brace
179 | ERROR | [x] Expected 1 blank line after function; 0 found
180 | ERROR | [x] Expected 1 newline at end of file; 2 found
180 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/src/Form/LivenessSortForm.php
-------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------
8 | ERROR | [x] Missing class doc comment
10 | ERROR | [x] Missing function doc comment
14 | ERROR | [x] Missing function doc comment
58 | ERROR | [x] Missing function doc comment
59 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
66 | ERROR | [x] Missing function doc comment
70 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
73 | ERROR | [x] Expected 1 blank line after function; 0 found
74 | ERROR | [x] Expected 1 newline at end of file; 2 found
74 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------
FILE: /var/www/html/d10/web/modules/contrib/liveness/liveness.module
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 27 ERRORS AND 4 WARNINGS AFFECTING 23 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
3 | WARNING | [x] Unused use statement
19 | ERROR | [x] Missing function doc comment
31 | WARNING | [ ] Line exceeds 80 characters; contains 106 characters
31 | ERROR | [x] Comments may not appear after statements
31 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
34 | ERROR | [x] Expected newline after closing brace
37 | ERROR | [x] Expected newline after closing brace
39 | ERROR | [x] Expected newline after closing brace
50 | ERROR | [x] Missing function doc comment
60 | WARNING | [ ] There must be no blank line following an inline comment
60 | ERROR | [x] Comments may not appear after statements
60 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
62 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
65 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
66 | ERROR | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
69 | ERROR | [x] Missing function doc comment
80 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
81 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
91 | ERROR | [x] Missing function doc comment
108 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
108 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
108 | ERROR | [x] Comments may not appear after statements
108 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
112 | ERROR | [x] Expected newline after closing brace
117 | ERROR | [x] Expected newline after closing brace
130 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
136 | ERROR | [x] Comments may not appear after statements
136 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
151 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over multiple lines
194 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 26 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Run PHPCS on Config Pages module.
Proposed resolution
Fixed the coding standards.
Remaining tasks
Submit the patch either MR.