Fix the issues reported by phpcs

Created on 26 December 2022, about 2 years ago
Updated 12 April 2023, almost 2 years ago

Problem/Motivation

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/pathauto.install
---------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------
137 | ERROR | [x] list(...) is forbidden, use [...] instead.
176 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/pathauto.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: ...ions/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/modules/pathauto_views_test/pathauto_views_test.info.yml
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------------------

FILE: ...drupal/modules/contrib/pathauto/tests/modules/pathauto_custom_punctuation_test/pathauto_custom_punctuation_test.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: ...upal/modules/contrib/pathauto/tests/modules/pathauto_custom_punctuation_test/pathauto_custom_punctuation_test.info.yml
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------------------

FILE: ...P/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/modules/pathauto_string_id_test/pathauto_string_id_test.info.yml
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/FunctionalJavascript/PathautoUiTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
9 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
62 | ERROR | [x] Missing function doc comment
72 | ERROR | [x] Missing function doc comment
102 | ERROR | [x] There should be no white space after an opening "("
107 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/FunctionalJavascript/PathautoLocaleTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 23 WARNINGS AFFECTING 30 LINES
----------------------------------------------------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
11 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
33 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up
| | over multiple lines
47 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
62 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
65 | ERROR | [ ] The array declaration extends to column 102 (the limit is 80). The array content should be split up
| | over multiple lines
83 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up
| | over multiple lines
87 | ERROR | [ ] The array declaration extends to column 120 (the limit is 80). The array content should be split up
| | over multiple lines
108 | WARNING | [x] A comma should follow the last multiline array item. Found: 'administer content translation'
162 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
164 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
165 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
166 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
167 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
168 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
169 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
170 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
171 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
172 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
173 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
174 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
177 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
179 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
180 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
181 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
182 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
183 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
184 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
185 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
186 | WARNING | [ ] Code after the RETURN statement on line 161 cannot be executed
201 | ERROR | [ ] The array declaration extends to column 133 (the limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoSettingsFormWebTest.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
222 | ERROR | Type hint "array" missing for $settings
---------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoBulkUpdateTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
21 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
22 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
75 | ERROR | [x] Missing function doc comment
107 | ERROR | [ ] The array declaration extends to column 102 (the limit is 80). The array content should be split up
| | over multiple lines
107 | ERROR | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoNodeWebTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
31 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up
| | over multiple lines
121 | ERROR | [x] There should be no white space after an opening "("
183 | ERROR | [ ] Missing short description in doc comment
188 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up
| | over multiple lines
209 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
226 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
264 | ERROR | [x] Expected 1 blank line after function; 2 found
292 | ERROR | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoMassDeleteTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------
100 | ERROR | The array declaration extends to column 150 (the limit is 80). The array content should be split up over
| | multiple lines
163 | ERROR | The array declaration extends to column 111 (the limit is 80). The array content should be split up over
| | multiple lines
163 | ERROR | The array declaration extends to column 110 (the limit is 80). The array content should be split up over
| | multiple lines
194 | ERROR | The array declaration extends to column 98 (the limit is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------------------------------------------------------------

FILE: ...plications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoEnablingEntityTypesTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------
61 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
75 | ERROR | [x] There should be no white space before a closing ")"
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Functional/PathautoTestHelperTrait.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 17 ERRORS AND 2 WARNINGS AFFECTING 19 LINES
----------------------------------------------------------------------------------------------------------------------------
68 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
73 | ERROR | [x] Missing function doc comment
77 | ERROR | [ ] The array declaration extends to column 223 (the limit is 80). The array content should be split up
| | over multiple lines
80 | ERROR | [x] Missing function doc comment
88 | ERROR | [x] Missing function doc comment
96 | ERROR | [x] Missing function doc comment
100 | ERROR | [x] Missing function doc comment
108 | ERROR | [x] Missing function doc comment
116 | ERROR | [x] Missing function doc comment
126 | ERROR | [x] Missing function doc comment
132 | ERROR | [x] Missing function doc comment
137 | ERROR | [x] Missing function doc comment
142 | ERROR | [ ] Missing short description in doc comment
143 | ERROR | [ ] Missing parameter comment
145 | ERROR | [ ] Description for the @return value is missing
159 | ERROR | [x] Missing function doc comment
170 | ERROR | [x] Missing function doc comment
182 | ERROR | [x] Missing function doc comment
184 | WARNING | [x] '@todo - implement cache reset.' should match the format '@todo Fix problem X here.'
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Kernel/PathautoEntityWithStringIdTest.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 5 WARNINGS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------------------------
78 | ERROR | [ ] Parameter tags must be defined first in a doc comment
79 | ERROR | [x] Parameter comment must end with a full stop
114 | WARNING | [x] A comma should follow the last multiline array item. Found: )
117 | WARNING | [x] A comma should follow the last multiline array item. Found: )
120 | WARNING | [x] A comma should follow the last multiline array item. Found: )
123 | WARNING | [x] A comma should follow the last multiline array item. Found: )
126 | WARNING | [x] A comma should follow the last multiline array item. Found: '123'
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Kernel/PathautoKernelTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 26 ERRORS AND 3 WARNINGS AFFECTING 26 LINES
----------------------------------------------------------------------------------------------------------------------------
20 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
32 | ERROR | [ ] Missing member variable doc comment
32 | ERROR | [ ] The array declaration extends to column 186 (the limit is 80). The array content should be split up
| | over multiple lines
34 | ERROR | [ ] Missing member variable doc comment
36 | ERROR | [ ] Missing short description in doc comment
41 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [x] Missing function doc comment
101 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
278 | WARNING | [ ] Line exceeds 80 characters; contains 102 characters
305 | ERROR | [ ] The array declaration extends to column 116 (the limit is 80). The array content should be split up
| | over multiple lines
314 | ERROR | [ ] The array declaration extends to column 130 (the limit is 80). The array content should be split up
| | over multiple lines
338 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
355 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
365 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up
| | over multiple lines
384 | ERROR | [ ] The array declaration extends to column 130 (the limit is 80). The array content should be split up
| | over multiple lines
386 | ERROR | [ ] The array declaration extends to column 88 (the limit is 80). The array content should be split up
| | over multiple lines
398 | ERROR | [ ] The array declaration extends to column 124 (the limit is 80). The array content should be split up
| | over multiple lines
402 | ERROR | [ ] The array declaration extends to column 144 (the limit is 80). The array content should be split up
| | over multiple lines
424 | ERROR | [x] Missing function doc comment
458 | ERROR | [ ] The array declaration extends to column 92 (the limit is 80). The array content should be split up
| | over multiple lines
466 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up
| | over multiple lines
471 | ERROR | [ ] The array declaration extends to column 95 (the limit is 80). The array content should be split up
| | over multiple lines
492 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up
| | over multiple lines
493 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up
| | over multiple lines
497 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
557 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up
| | over multiple lines
593 | ERROR | [x] There should be no white space before a closing ")"
593 | ERROR | [x] Expected 1 space before opening brace; found 0
593 | ERROR | [x] Expected 0 spaces before closing parenthesis; 1 found
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/tests/src/Kernel/PathautoTokenTest.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------------------------------------------------------------
23 | ERROR | [x] Missing function doc comment
38 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
39 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
92 | ERROR | [ ] The array declaration extends to column 156 (the limit is 80). The array content should be split up
| | over multiple lines
95 | ERROR | [ ] The array declaration extends to column 125 (the limit is 80). The array content should be split up
| | over multiple lines
98 | ERROR | [ ] The array declaration extends to column 298 (the limit is 80). The array content should be split up
| | over multiple lines
101 | ERROR | [ ] The array declaration extends to column 251 (the limit is 80). The array content should be split up
| | over multiple lines
108 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/pathauto.module
----------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------
16 | WARNING | Line exceeds 80 characters; contains 88 characters
55 | ERROR | The array declaration extends to column 656 (the limit is 80). The array content should be split up over
| | multiple lines
148 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
164 | ERROR | The array declaration extends to column 220 (the limit is 80). The array content should be split up over
| | multiple lines
168 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/pathauto.api.php
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
10 | ERROR | Missing short description in doc comment
---------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Form/PathautoBulkUpdateForm.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
136 | ERROR | The array declaration extends to column 110 (the limit is 80). The array content should be split up over
| | multiple lines
136 | ERROR | The array declaration extends to column 109 (the limit is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Form/PatternEditForm.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [ ] Missing short description in doc comment
113 | ERROR | [x] Inline comments must start with a capital letter
124 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up
| | over multiple lines
143 | ERROR | [ ] The array declaration extends to column 102 (the limit is 80). The array content should be split up
| | over multiple lines
226 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up
| | over multiple lines
240 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
255 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Form/PathautoAdminDelete.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------------------------
90 | ERROR | The array declaration extends to column 181 (the limit is 80). The array content should be split up over
| | multiple lines
128 | ERROR | The array declaration extends to column 97 (the limit is 80). The array content should be split up over
| | multiple lines
128 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up over
| | multiple lines
134 | ERROR | The array declaration extends to column 100 (the limit is 80). The array content should be split up over
| | multiple lines
138 | ERROR | The array declaration extends to column 84 (the limit is 80). The array content should be split up over
| | multiple lines
139 | ERROR | The array declaration extends to column 100 (the limit is 80). The array content should be split up over
| | multiple lines
150 | ERROR | The array declaration extends to column 82 (the limit is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasStorageHelperInterface.php
----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------
105 | ERROR | Missing parameter type
130 | ERROR | Type hint "array" missing for $pids
----------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoPatternInterface.php
-------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 11 LINES
-------------------------------------------------------------------------------------------------------
15 | ERROR | Description for the @return value is missing
22 | ERROR | Missing parameter comment
31 | ERROR | Description for the @return value is missing
35 | ERROR | Missing short description in doc comment
36 | ERROR | Description for the @return value is missing
43 | ERROR | Description for the @return value is missing
60 | ERROR | Description for the @return value is missing
128 | ERROR | Description for the @return value is missing
149 | ERROR | Description for the @return value is missing
174 | ERROR | Missing parameter type
177 | ERROR | Description for the @return value is missing
-------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Entity/PathautoPattern.php
-----------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------
100 | ERROR | [ ] Missing short description in doc comment
126 | ERROR | [ ] Missing short description in doc comment
131 | ERROR | [ ] Missing short description in doc comment
403 | ERROR | [x] Parameter comment must end with a full stop
418 | ERROR | [x] list(...) is forbidden, use [...] instead.
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoPatternListBuilder.php
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
40 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasCleaner.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 34 ERRORS AFFECTING 34 LINES
----------------------------------------------------------------------------------------------------------------------------
197 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
248 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
296 | ERROR | [ ] The array declaration extends to column 106 (the limit is 80). The array content should be split up over
| | multiple lines
297 | ERROR | [ ] The array declaration extends to column 120 (the limit is 80). The array content should be split up over
| | multiple lines
298 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over
| | multiple lines
299 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
300 | ERROR | [ ] The array declaration extends to column 90 (the limit is 80). The array content should be split up over
| | multiple lines
301 | ERROR | [ ] The array declaration extends to column 90 (the limit is 80). The array content should be split up over
| | multiple lines
302 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over
| | multiple lines
303 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
304 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over
| | multiple lines
305 | ERROR | [ ] The array declaration extends to column 103 (the limit is 80). The array content should be split up over
| | multiple lines
306 | ERROR | [ ] The array declaration extends to column 102 (the limit is 80). The array content should be split up over
| | multiple lines
307 | ERROR | [ ] The array declaration extends to column 103 (the limit is 80). The array content should be split up over
| | multiple lines
308 | ERROR | [ ] The array declaration extends to column 103 (the limit is 80). The array content should be split up over
| | multiple lines
309 | ERROR | [ ] The array declaration extends to column 104 (the limit is 80). The array content should be split up over
| | multiple lines
310 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over
| | multiple lines
311 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over
| | multiple lines
312 | ERROR | [ ] The array declaration extends to column 92 (the limit is 80). The array content should be split up over
| | multiple lines
313 | ERROR | [ ] The array declaration extends to column 93 (the limit is 80). The array content should be split up over
| | multiple lines
314 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over
| | multiple lines
315 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
316 | ERROR | [ ] The array declaration extends to column 95 (the limit is 80). The array content should be split up over
| | multiple lines
317 | ERROR | [ ] The array declaration extends to column 114 (the limit is 80). The array content should be split up over
| | multiple lines
318 | ERROR | [ ] The array declaration extends to column 91 (the limit is 80). The array content should be split up over
| | multiple lines
319 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split up over
| | multiple lines
320 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
321 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split up over
| | multiple lines
322 | ERROR | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up over
| | multiple lines
323 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over
| | multiple lines
324 | ERROR | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over
| | multiple lines
325 | ERROR | [ ] The array declaration extends to column 101 (the limit is 80). The array content should be split up over
| | multiple lines
326 | ERROR | [ ] The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
327 | ERROR | [ ] The array declaration extends to column 94 (the limit is 80). The array content should be split up over
| | multiple lines
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------
193 | ERROR | [ ] The array declaration extends to column 126 (the limit is 80). The array content should be split up over
| | multiple lines
284 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
285 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
297 | ERROR | [ ] The text '@deprecated Use \Drupal\pathauto\PathautoState::bulkDelete() instead.' does not match the
| | standard format: @deprecated in %deprecation-version% and is removed from %removal-version%.
| | %extra-info%.
297 | ERROR | [ ] Each @deprecated tag must have a @see tag immediately following it
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Plugin/Deriver/EntityAliasTypeDeriver.php
--------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------
23 | ERROR | [ ] Missing short description in doc comment
35 | ERROR | [ ] Missing short description in doc comment
89 | WARNING | [x] A comma should follow the last multiline array item. Found: )
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasCleanerInterface.php
----------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------
5 | ERROR | Missing short description in doc comment
16 | WARNING | Line exceeds 80 characters; contains 81 characters
55 | WARNING | Line exceeds 80 characters; contains 81 characters
96 | ERROR | Type hint "array" missing for $replacements
96 | ERROR | Type hint "array" missing for $data
96 | ERROR | Type hint "array" missing for $options
----------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoWidget.php
---------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 12 LINES
---------------------------------------------------------------------------------------------
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 4 spaces, found 6
31 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
32 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
35 | WARNING | [ ] Line exceeds 80 characters; contains 146 characters
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
37 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
38 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasTypeBatchUpdateInterface.php
------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------
22 | ERROR | Type hint "array" missing for $context
30 | ERROR | Type hint "array" missing for $context
------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasUniquifier.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
105 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoState.php
--------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------
30 | ERROR | Missing short description in doc comment
123 | ERROR | Description for the @return value is missing
--------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoFieldItemList.php
----------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------
7 | ERROR | [x] Missing class doc comment
9 | ERROR | [ ] Missing short description in doc comment
29 | ERROR | [ ] Missing short description in doc comment
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/AliasUniquifierInterface.php
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
13 | WARNING | Line exceeds 80 characters; contains 81 characters
-------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/Commands/PathautoCommands.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 14 LINES
----------------------------------------------------------------------------------------------------------------------------
65 | ERROR | [ ] Doc comment short description must start with a capital letter
69 | ERROR | [ ] Parameter tags must be defined first in a doc comment
100 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up over
| | multiple lines
100 | ERROR | [ ] The array declaration extends to column 109 (the limit is 80). The array content should be split up over
| | multiple lines
107 | ERROR | [ ] Parameter $options is not described in comment
108 | ERROR | [x] Doc comment short description must end with a full stop
112 | ERROR | [ ] Parameter tags must be defined first in a doc comment
143 | ERROR | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over
| | multiple lines
143 | ERROR | [ ] The array declaration extends to column 96 (the limit is 80). The array content should be split up over
| | multiple lines
148 | ERROR | [ ] The array declaration extends to column 100 (the limit is 80). The array content should be split up over
| | multiple lines
170 | ERROR | [ ] Missing short description in doc comment
183 | ERROR | [ ] Missing short description in doc comment
197 | ERROR | [ ] Missing short description in doc comment
201 | ERROR | [ ] @throws tag comment must end with a full stop
216 | ERROR | [ ] Missing short description in doc comment
220 | ERROR | [ ] @throws tag comment must end with a full stop
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/EventSubscriber/PathautoSettingsCacheTag.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
16 | ERROR | Missing short description in doc comment
-----------------------------------------------------------------------------------------------------------------------

FILE: /Applications/MAMP/htdocs/10.1.x/drupal/modules/contrib/pathauto/src/PathautoGeneratorInterface.php
---------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 7 LINES
---------------------------------------------------------------------------------------------------------
13 | ERROR | [ ] Doc comment short description must start with a capital letter
13 | ERROR | [ ] Doc comment short description must end with a full stop
18 | ERROR | [ ] Doc comment short description must start with a capital letter
18 | ERROR | [ ] Doc comment short description must end with a full stop
23 | ERROR | [ ] Doc comment short description must start with a capital letter
23 | ERROR | [ ] Doc comment short description must end with a full stop
53 | ERROR | [ ] Description for the @return value is missing
76 | ERROR | [x] Data types in @param tags need to be fully namespaced
81 | ERROR | [ ] Parameter comment must start with a capital letter
82 | ERROR | [x] Parameter comment must end with a full stop

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia amanshukla6158

    I have added another patch resolving coding standards Issues, Please review once.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nayana_mvr

    Verified the patch #4 and tested it on Drupal version 10.1.x and Pathauto 8.x-1.x. Patch applied cleanly but there are few more issues. Please see the attachments for reference.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rassoni Bangalore
  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    +          'value' => '"',
    +          'name' => $this->t('Double quotation marks'),
    +        ];
    +        $punctuation['quotes']            = [
    +          'value' => '\'',
    +          'name' => $this->t("Single quotation marks (apostrophe)"),
    +        ];
    +        $punctuation['backtick']          = [
    +          'value' => '`',
    +          'name' => $this->t('Back tick'),
    

    Vertically aligning the assignment operator is not required. The code is also more readable as it was; it is sufficient to remove the extra spaces before the assignment operator.

    /**
    - * Delete URL aliases
    + * Delete URL aliases.
    *

    The verb needs to use the third person singular.

    -   *   A ":" delimited set of tokens representing
    +   *   A ":" delimited set of tokens representing.

    That phase is incomplete: representing needs an object. (What does the set of tokens represent?)

    -          if (in_array($condition->getPluginId(), ['entity_bundle:' . $entity_type->id(), 'node_type'])) {
    +          if (in_array($condition->getPluginId(), [
    +            'entity_bundle:' . $entity_type->id(),
    +            'node_type',
    +          ])) {
    

    That is how PSR12 would require the code to be formatted. Drupal coding standards suggest to write that statement in a single line.

    +/**
    + *
    + */
     class PathautoFieldItemList extends PathFieldItemList {
    

    An empty documentation comment is like not having a documentation comment. Each class needs a documentation comment that describe the class purpose.

       /**
    -   * "Create a new alias. Leave the existing alias functioning."
    +   * Create a new alias. Leave the existing alias functioning.
        */
    

    Since that is a description for a constant, it is not correct. I know that is the same error done from the existing code, but since the comment is edited, it should be edited to make it follow the coding standards, and make it useful.

         /*
         $form['path'] += array(
    -      '#type' => 'fieldset',
    -      '#title' => $this->t('URL path settings'),
    -      '#collapsible' => TRUE,
    -      '#collapsed' => empty($form['path']['alias']),
    -      '#group' => 'additional_settings',
    -      '#attributes' => array(
    -        'class' => array('path-form'),
    -      ),
    -      '#access' => \Drupal::currentUser()->hasPermission('create url aliases') || \Drupal::currentUser()->hasPermission('administer url aliases'),
    -      '#weight' => 30,
    -      '#tree' => TRUE,
    -      '#element_validate' => array('path_form_element_validate'),
    +    '#type' => 'fieldset',
    +    '#title' => $this->t('URL path settings'),
    +    '#collapsible' => TRUE,
    +    '#collapsed' => empty($form['path']['alias']),
    +    '#group' => 'additional_settings',
    +    '#attributes' => array(
    +    'class' => array('path-form'),
    +    ),
    +    '#access' => \Drupal::currentUser()->hasPermission('create url aliases') || \Drupal::currentUser()->hasPermission('administer url aliases'),
    +    '#weight' => 30,
    +    '#tree' => TRUE,
    +    '#element_validate' => array('path_form_element_validate'),
         );*/

    The indentation is wrong. The existing code uses the correct indentation.
    Anyway, that code is commented out. Why should it be changed? (I hope not to correct something that does not need to be corrected.)

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia kkalashnikov Ghaziabad, India
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ashutosh ahirwal India

    Providing Updated patch for review.

  • The last submitted patch, 9: phpcs-issue-fixes-3329625-9.patch, failed testing. View results โ†’
    - codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • Status changed to Closed: duplicate almost 2 years ago
  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand xurizaemon ลŒtepoti, Aotearoa ๐Ÿ

    Seems like a duplicate of ๐Ÿ“Œ Drupal best practices Needs work , also targeting 8.x-1.x with a PHPCS patch that has crossover with work here.

    In that issue, @Berdir (maintainer) said -

    Disclaimer: This issue change does not mean that I mean to commit this soon. As commented elsewhere, reviewing huge coding standard change issues is a lot of work and I'd strongly recommend to not work on such issues without discussing such changes with the maintainer *first*, to avoid wasting time (both yours and that of maintainers) :)

    Closing as duplicate.

Production build 0.71.5 2024