Problem/Motivation
FILE: ...ontribution/drupal10/web/modules/contrib/consent_popup/js/consent-popup.js
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
46 | ERROR | [x] Inline control structures are not allowed
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ntribution/drupal10/web/modules/contrib/consent_popup/consent_popup.module
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
--------------------------------------------------------------------------------
7 | ERROR | [x] Additional blank lines found at end of doc comment
9 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
11 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
12 | ERROR | [x] Expected 3 space(s) before asterisk; 1 found
13 | ERROR | [x] Expected 3 space(s) before asterisk; 1 found
41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
46 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | 'consent-popup'
47 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
49 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...www/html/contribution/drupal10/web/modules/contrib/consent_popup/README.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | WARNING | Line exceeds 80 characters; contains 89 characters
--------------------------------------------------------------------------------
FILE: ...0/web/modules/contrib/consent_popup/src/Plugin/Block/ConsentPopupBlock.php
--------------------------------------------------------------------------------
FOUND 40 ERRORS AND 23 WARNINGS AFFECTING 46 LINES
--------------------------------------------------------------------------------
3 | ERROR | [x] There must be one blank line after the namespace
| | declaration
25 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
37 | ERROR | [x] Expected 1 space before "?"; 2 found
37 | ERROR | [x] Whitespace found at end of line
38 | ERROR | [x] Expected 1 space after ":"; 2 found
39 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
39 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
44 | ERROR | [x] Expected 1 space before "?"; 2 found
44 | ERROR | [x] Whitespace found at end of line
45 | ERROR | [x] Whitespace found at end of line
47 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
47 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
52 | ERROR | [x] Expected 1 space before "?"; 2 found
54 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
54 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
59 | ERROR | [x] Expected 1 space before "?"; 2 found
61 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
61 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
64 | ERROR | [x] Expected 1 space after "="; 0 found
67 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
72 | ERROR | [x] Expected 1 space before "?"; 2 found
73 | WARNING | [ ] Translatable strings must not begin or end with white
| | spaces, use placeholders with t() for variables
74 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
74 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
79 | ERROR | [x] Expected 1 space before "?"; 2 found
81 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
81 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
83 | ERROR | [x] Expected 1 space after "="; 0 found
86 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
91 | ERROR | [x] Expected 1 space before "?"; 2 found
93 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: true
93 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE"
| | but found "true"
98 | ERROR | [x] Expected 1 space before "?"; 2 found
99 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
101 | ERROR | [x] Expected 1 space after "="; 0 found
104 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
106 | ERROR | [x] Short array syntax must be used to define arrays
114 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait and
| | $this->t() instead
122 | ERROR | [x] Expected 1 space before "?"; 2 found
123 | WARNING | [ ] Translatable strings must not begin or end with white
| | spaces, use placeholders with t() for variables
123 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
126 | ERROR | [x] Expected 1 blank line after function; 2 found
127 | ERROR | [x] Whitespace found at end of line
142 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency
| | injection instead
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
148 | ERROR | [x] Concat operator must be surrounded by a single space
149 | ERROR | [x] Expected one space after the comma, 0 found
150 | ERROR | [x] Expected 1 space after "="; 2 found
157 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
159 | ERROR | [x] Expected 1 space after "=>"; 0 found
161 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: 'consent_popup/consent_popup'
169 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: $blurElements
170 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
171 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
172 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: ]
175 | ERROR | [x] Expected 1 blank line after function; 0 found
176 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 58 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ww/html/contribution/drupal10/web/modules/contrib/consent_popup/README.txt
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
15 | WARNING | Line exceeds 80 characters; contains 89 characters
--------------------------------------------------------------------------------
FILE: ...upal10/web/modules/contrib/consent_popup/templates/consent-popup.html.twig
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 429ms; Memory: 10MB
Steps to reproduce
Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml,twig consent_popup/
Proposed resolution
Resolve all issues for Drupal and DrupalPractice coding standards
Remaining tasks
Patch review and fix remaining issues
FILE: ...0/web/modules/contrib/consent_popup/src/Plugin/Block/ConsentPopupBlock.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------
26 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
142 | WARNING | \Drupal calls should be avoided in classes, use dependency
| | injection instead
--------------------------------------------------------------------------------
Time: 419ms; Memory: 10MB