Problem/Motivation
FILE: ...eb/modules/contrib/vocabulary_catalog/src/Plugin/Block/VocabularyCatalogBlock.php
---------------------------------------------------------------------------------------
FOUND 97 ERRORS AND 10 WARNINGS AFFECTING 86 LINES
---------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
8 | ERROR | [x] PHP keywords must be lowercase; expected "use" but found "Use"
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
24 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
25 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
26 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
27 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
28 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
29 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
36 | ERROR | [x] Short array syntax must be used to define arrays
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
38 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
40 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
41 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
47 | ERROR | [x] Expected 1 space after IF keyword; 0 found
48 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
48 | WARNING | [ ] Only string literals should be passed to t() where possible
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
51 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
51 | ERROR | [x] Short array syntax must be used to define arrays
54 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | $terms_display_layout
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
60 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
62 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
63 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
66 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
71 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
72 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
78 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
79 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
80 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
82 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
82 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
83 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
83 | WARNING | [ ] Vocabulary::loadMultiple calls should be avoided in classes, use
| | dependency injection instead
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
84 | ERROR | [x] Short array syntax must be used to define arrays
85 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
85 | ERROR | [x] Expected 1 space after IF keyword; 0 found
86 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
86 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
87 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
87 | WARNING | [ ] Only string literals should be passed to t() where possible
88 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
89 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
95 | ERROR | [x] Expected 1 space before "??"; 0 found
95 | ERROR | [x] Expected 1 space after "??"; 0 found
97 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found
| | "true"
101 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
105 | ERROR | [x] Expected 1 space before "??"; 0 found
105 | ERROR | [x] Expected 1 space after "??"; 0 found
105 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
109 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
113 | ERROR | [x] Expected 1 space before "??"; 0 found
113 | ERROR | [x] Expected 1 space after "??"; 0 found
114 | ERROR | [x] Short array syntax must be used to define arrays
116 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use
| | placeholders with t() for variables
117 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use
| | placeholders with t() for variables
118 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use
| | placeholders with t() for variables
118 | WARNING | [x] A comma should follow the last multiline array item. Found: )
123 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
127 | ERROR | [x] Expected 1 space before "??"; 0 found
127 | ERROR | [x] Expected 1 space after "??"; 0 found
128 | ERROR | [x] Short array syntax must be used to define arrays
130 | WARNING | [x] A comma should follow the last multiline array item. Found: )
132 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found
| | "true"
136 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
140 | ERROR | [x] Expected 1 space before "??"; 0 found
140 | ERROR | [x] Expected 1 space after "??"; 0 found
144 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
145 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
147 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
150 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
151 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
152 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
153 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
154 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
155 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
156 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
157 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
159 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
162 | ERROR | [x] Doc comment long description must start with a capital letter
164 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
165 | ERROR | [x] Opening brace should be on the same line as the declaration
166 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
167 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
167 | ERROR | [x] Expected 1 blank line after function; 0 found
168 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
168 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 2
168 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 101 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: ...ibution/drupal10/web/modules/contrib/vocabulary_catalog/vocabulary_catalog.module
---------------------------------------------------------------------------------------
FOUND 147 ERRORS AND 4 WARNINGS AFFECTING 112 LINES
---------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
4 | ERROR | [x] PHP keywords must be lowercase; expected "use" but found "Use"
5 | WARNING | [x] Unused use statement
15 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
16 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
17 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces,
| | found 4
18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
18 | ERROR | [x] Closing brace indented incorrectly; expected 2 spaces, found 0
22 | ERROR | [x] Doc comment short description must end with a full stop
23 | ERROR | [x] There must be exactly one blank line before the tags in a doc
| | comment
23 | ERROR | [ ] Missing parameter comment
23 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
24 | ERROR | [x] Separate the @param and @return sections by a blank line.
24 | ERROR | [ ] Description for the @return value is missing
26 | ERROR | [ ] Type hint "[type]" missing for $config_data
26 | ERROR | [ ] Invalid function name, expected get_vocabulary_catalog but found
| | getVocabularyCatalog
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Short array syntax must be used to define arrays
33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
33 | ERROR | [x] Expected 1 space after IF keyword; 0 found
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
34 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
35 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
36 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
36 | ERROR | [x] Expected 1 space after IF keyword; 0 found
37 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
38 | WARNING | [ ] Unused variable $term_data.
38 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
38 | ERROR | [x] Short array syntax must be used to define arrays
39 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
39 | ERROR | [x] Short array syntax must be used to define arrays
41 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
42 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
43 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
44 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
46 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
46 | ERROR | [x] Expected 1 space after "="; 0 found
47 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
47 | ERROR | [x] Expected 1 space after IF keyword; 0 found
48 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
49 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 21
50 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 21
50 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found
| | "true"
52 | WARNING | [ ] Line exceeds 80 characters; contains 103 characters
52 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 24
52 | ERROR | [x] Inline comments must start with a capital letter
53 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 24
53 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
54 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 21
54 | ERROR | [x] Expected 1 space after IF keyword; 0 found
55 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
56 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 20
56 | ERROR | [x] Closing brace indented incorrectly; expected 21 spaces, found 20
58 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 20
58 | ERROR | [x] Expected 1 space after IF keyword; 0 found
59 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
60 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
61 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
62 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
63 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
65 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
66 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
67 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
67 | ERROR | [x] Expected 1 space before "?"; 0 found
67 | ERROR | [x] Expected 1 space after "?"; 0 found
67 | ERROR | [x] Expected 1 space before ":"; 0 found
67 | ERROR | [x] Expected 1 space after ":"; 0 found
69 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
70 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
71 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
72 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
74 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
75 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
76 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
77 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
78 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
79 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
81 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
82 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
83 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
85 | ERROR | [x] Line indented incorrectly; expected 14 spaces, found 24
85 | ERROR | [x] Short array syntax must be used to define arrays
92 | ERROR | [x] Array closing indentation error, expected 24 spaces but found 22
93 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 20
94 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
94 | ERROR | [x] Closing brace indented incorrectly; expected 20 spaces, found 16
95 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
95 | ERROR | [x] Closing brace indented incorrectly; expected 16 spaces, found 12
97 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
97 | ERROR | [x] Expected 1 space after IF keyword; 0 found
98 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
99 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
100 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
101 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
102 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
103 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
105 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
106 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
107 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
109 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
110 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
111 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
113 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
113 | ERROR | [x] Closing brace indented incorrectly; expected 12 spaces, found 8
115 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
115 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
116 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
116 | ERROR | [x] Expected 1 space after IF keyword; 0 found
117 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
118 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
119 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
120 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
121 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
122 | ERROR | [x] Closing brace indented incorrectly; expected 8 spaces, found 4
123 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
123 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found 0
125 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0
128 | ERROR | [ ] Missing short description in doc comment
129 | ERROR | [ ] Parameter comment must start with a capital letter
129 | ERROR | [x] Parameter comment must be on the next line
132 | ERROR | [x] Opening brace should be on the same line as the declaration
133 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
134 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
134 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
135 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
136 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
138 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
138 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
139 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
140 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
141 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
141 | ERROR | [x] Expected 1 space after IF keyword; 0 found
142 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
143 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
144 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
145 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
146 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
147 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
149 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
153 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
154 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
154 | ERROR | [x] There must be no blank lines after the function comment
157 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
159 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
160 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
162 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 143 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
FILE: ...b/modules/contrib/vocabulary_catalog/templates/vocabulary-catalog-block.html.twig
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
57 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------
Time: 454ms; 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 vocabulary_catalog/
Remaining tasks
Patch review.