Phpcs Drupal coding standard issue

Created on 17 February 2023, almost 2 years ago

FILE: /var/www/html/contribution/web/modules/contrib/update_notify/src/UpdateInformationService.php
---------------------------------------------------------------------------------------------------
FOUND 21 ERRORS AFFECTING 16 LINES
---------------------------------------------------------------------------------------------------
27 | ERROR | [ ] Description for the @return value is missing
85 | ERROR | [ ] Missing parameter comment
85 | ERROR | [ ] Missing parameter type
87 | ERROR | [ ] Description for the @return value is missing
104 | ERROR | [ ] Missing parameter comment
104 | ERROR | [ ] Missing parameter type
106 | ERROR | [ ] Description for the @return value is missing
116 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
120 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
127 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
141 | ERROR | [ ] Missing parameter comment
141 | ERROR | [ ] Missing parameter type
143 | ERROR | [ ] Description for the @return value is missing
156 | ERROR | [x] Expected 1 blank line after function; 2 found
162 | ERROR | [ ] Missing parameter comment
162 | ERROR | [ ] Missing parameter type
163 | ERROR | [ ] Missing parameter comment
163 | ERROR | [ ] Missing parameter type
165 | ERROR | [ ] Description for the @return value is missing
200 | ERROR | [x] Expected 1 blank line after function; 2 found
203 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/update_notify/src/NotifyService.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 83 ERRORS AND 14 WARNINGS AFFECTING 64 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
52 | ERROR | [ ] Doc comment short description must start with a capital letter
56 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
116 | ERROR | [x] Doc comment short description must end with a full stop
118 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
118 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
119 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
121 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
121 | ERROR | [ ] Description for the @return value is missing
150 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
150 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
151 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
151 | ERROR | [x] Parameter comment must end with a full stop
153 | ERROR | [ ] Description for the @return value is missing
163 | ERROR | [ ] Missing parameter comment
163 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
163 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
165 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
165 | ERROR | [ ] Description for the @return value is missing
174 | ERROR | [ ] Missing parameter comment
174 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
174 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
176 | ERROR | [ ] Description for the @return value is missing
186 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
186 | ERROR | [ ] Description for the @return value is missing
196 | ERROR | [ ] Missing parameter comment
196 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
196 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
198 | ERROR | [ ] Description for the @return value is missing
201 | ERROR | [x] Expected 1 space after IF keyword; 0 found
211 | ERROR | [ ] Description for the @return value is missing
217 | ERROR | [x] Case breaking statements must be followed by a single blank line
217 | ERROR | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 10
219 | ERROR | [x] Case breaking statements must be followed by a single blank line
219 | ERROR | [x] Case breaking statement indented incorrectly; expected 8 spaces, found 10
228 | ERROR | [ ] Missing parameter comment
228 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
228 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
230 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
230 | ERROR | [ ] Description for the @return value is missing
234 | ERROR | [x] Expected 1 space after IF keyword; 0 found
239 | ERROR | [x] Expected 1 space after IF keyword; 0 found
247 | ERROR | [ ] Missing parameter comment
247 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
247 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
248 | ERROR | [ ] Missing parameter comment
248 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
248 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
250 | ERROR | [ ] Description for the @return value is missing
257 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
258 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
267 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
273 | WARNING | [x] A comma should follow the last multiline array item. Found: ''
279 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables
280 | ERROR | [x] Expected newline after closing brace
300 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
307 | WARNING | [x] A comma should follow the last multiline array item. Found: $notice
316 | ERROR | [x] Expected newline after closing brace
333 | WARNING | [x] A comma should follow the last multiline array item. Found: NOTICE_SECURITY
336 | WARNING | [x] A comma should follow the last multiline array item. Found: NOTICE_UNSUPPORTED
339 | WARNING | [x] A comma should follow the last multiline array item. Found: NOTICE_MAJOR
348 | ERROR | [ ] Description for the @return value is missing
354 | WARNING | [x] A comma should follow the last multiline array item. Found: )
358 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
358 | ERROR | [x] 4 spaces found before inline comment; expected "// $include_drush = $this->config->get('include_drush');" but found "// $include_drush =
| | $this->config->get('include_drush');"
359 | WARNING | [x] There must be no blank line following an inline comment
359 | WARNING | [ ] There must be no blank line following an inline comment
359 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
362 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
364 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
364 | ERROR | [x] 4 spaces found before inline comment; expected "// // Features coming soon." but found "// // Features coming soon."
365 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
366 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
366 | ERROR | [ ] Comment indentation error, expected only 4 spaces
367 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
368 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
369 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
369 | ERROR | [ ] Comment indentation error, expected only 4 spaces
370 | WARNING | [x] There must be no blank line following an inline comment
370 | WARNING | [ ] There must be no blank line following an inline comment
370 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
379 | ERROR | [ ] Missing parameter comment
379 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
379 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
381 | ERROR | [ ] Description for the @return value is missing
383 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
384 | ERROR | [x] Expected 1 space after IF keyword; 0 found
385 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
403 | ERROR | [ ] Missing parameter comment
403 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
403 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
405 | ERROR | [ ] Description for the @return value is missing
407 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
408 | ERROR | [x] Expected 1 space after IF keyword; 0 found
414 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
415 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
420 | ERROR | [x] Expected 1 blank line after function; 0 found
421 | ERROR | [x] The closing brace for the class must have an empty line before it
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 64 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/update_notify/src/TextTable.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 69 ERRORS AND 2 WARNINGS AFFECTING 40 LINES
-------------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Doc comment short description must end with a full stop
8 | WARNING | [ ] @author tags are not usually used in Drupal, because over time multiple contributors will touch the code anyway
14 | ERROR | [x] The open comment tag must be the only content on the line
14 | ERROR | [ ] Missing short description in doc comment
14 | ERROR | [x] Expected "intThesourcepath" but found "int The source path " for @var tag in member variable comment
16 | ERROR | [x] The open comment tag must be the only content on the line
16 | ERROR | [ ] Missing short description in doc comment
16 | ERROR | [x] Expected "arrayThesourcepath" but found "array The source path " for @var tag in member variable comment
18 | ERROR | [x] The open comment tag must be the only content on the line
18 | ERROR | [ ] Missing short description in doc comment
18 | ERROR | [x] Expected "arrayThesourcepath" but found "array The source path " for @var tag in member variable comment
20 | ERROR | [x] The open comment tag must be the only content on the line
20 | ERROR | [ ] Missing short description in doc comment
20 | ERROR | [x] Expected "arrayThesourcepath" but found "array The source path " for @var tag in member variable comment
22 | ERROR | [x] The open comment tag must be the only content on the line
22 | ERROR | [ ] Missing short description in doc comment
22 | ERROR | [x] Expected "arrayThesourcepath" but found "array The source path " for @var tag in member variable comment
25 | WARNING | [x] A comma should follow the last multiline array item. Found: 'C'
28 | ERROR | [ ] Missing short description in doc comment
29 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
29 | ERROR | [x] Parameter comment must be on the next line
29 | ERROR | [x] Parameter comment must end with a full stop
30 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
30 | ERROR | [x] Parameter comment must be on the next line
30 | ERROR | [x] Parameter comment must end with a full stop
31 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
31 | ERROR | [x] Parameter comment must be on the next line
31 | ERROR | [x] Parameter comment must end with a full stop
33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
36 | ERROR | [x] Expected newline after closing brace
54 | ERROR | [x] Doc comment short description must end with a full stop
56 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
56 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
56 | ERROR | [x] Parameter comment must be on the next line
56 | ERROR | [x] Parameter comment must end with a full stop
63 | ERROR | [x] Doc comment short description must end with a full stop
65 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
65 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
65 | ERROR | [x] Parameter comment must be on the next line
65 | ERROR | [x] Parameter comment must end with a full stop
72 | ERROR | [x] Expected newline after closing brace
74 | ERROR | [x] Expected 1 space before "-"; 0 found
74 | ERROR | [x] Expected 1 space after "-"; 0 found
74 | ERROR | [x] Concat operator must be surrounded by a single space
75 | ERROR | [x] Expected newline after closing brace
86 | ERROR | [x] Doc comment short description must end with a full stop
88 | ERROR | [ ] Description for the @return value is missing
92 | ERROR | [x] Inline control structures are not allowed
94 | ERROR | [x] Concat operator must be surrounded by a single space
95 | ERROR | [x] Concat operator must be surrounded by a single space
96 | ERROR | [x] Concat operator must be surrounded by a single space
97 | ERROR | [x] Concat operator must be surrounded by a single space
101 | ERROR | [x] Doc comment short description must end with a full stop
103 | ERROR | [ ] Missing parameter comment
103 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
103 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
105 | ERROR | [ ] Description for the @return value is missing
110 | ERROR | [x] Concat operator must be surrounded by a single space
110 | ERROR | [x] Concat operator must be surrounded by a single space
110 | ERROR | [x] Concat operator must be surrounded by a single space
113 | ERROR | [x] Concat operator must be surrounded by a single space
117 | ERROR | [x] Doc comment short description must end with a full stop
119 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
119 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
119 | ERROR | [x] Parameter comment must be on the next line
119 | ERROR | [x] Parameter comment must end with a full stop
121 | ERROR | [ ] Description for the @return value is missing
127 | ERROR | [x] Concat operator must be surrounded by a single space
128 | ERROR | [x] Inline control structures are not allowed
132 | ERROR | [x] Expected 1 blank line after function; 0 found
133 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 60 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/update_notify/src/Form/UpdateNotifySettingsForm.php
-------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 57 ERRORS AND 10 WARNINGS AFFECTING 46 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------
48 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
48 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
49 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
50 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
50 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
52 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
52 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
74 | ERROR | [x] Expected 1 blank line after function; 2 found
115 | WARNING | [ ] #options values usually have to run through t() for translation
116 | WARNING | [ ] #options values usually have to run through t() for translation
117 | WARNING | [ ] #options values usually have to run through t() for translation
154 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
156 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
156 | ERROR | [x] 4 spaces found before inline comment; expected "// $form['include_drush'] = [" but found "// $form['include_drush'] = ["
157 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
157 | ERROR | [ ] Comment indentation error, expected only 4 spaces
158 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
159 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
159 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
160 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
161 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
162 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
163 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
164 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
164 | ERROR | [ ] Comment indentation error, expected only 4 spaces
165 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
166 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
166 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
167 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
168 | WARNING | [x] There must be no blank line following an inline comment
168 | WARNING | [ ] There must be no blank line following an inline comment
168 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
177 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
194 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
226 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
252 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
253 | ERROR | [x] Comments may not appear after statements
300 | ERROR | [ ] Missing parameter comment
300 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
300 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
301 | ERROR | [ ] Missing parameter comment
301 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
301 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
303 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
303 | ERROR | [ ] Description for the @return value is missing
321 | ERROR | [ ] Missing parameter comment
321 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
321 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
322 | ERROR | [ ] Missing parameter comment
322 | ERROR | [x] Expected 1 spaces after parameter type; 2 found
322 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
324 | ERROR | [ ] If there is no return value for a function, there must not be a @return tag.
324 | ERROR | [ ] Description for the @return value is missing
331 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
332 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
333 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
334 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
335 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 0
335 | ERROR | [x] 15 spaces found before inline comment; expected "// 'include_drush'," but found "// 'include_drush',"
336 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 0
337 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
338 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
339 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
340 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
341 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
342 | ERROR | [x] Array indentation error, expected 6 spaces but found 15
343 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 13
-------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 48 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/update_notify/README.md
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------
10 | WARNING | Line exceeds 80 characters; contains 139 characters
12 | WARNING | Line exceeds 80 characters; contains 132 characters
----------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India himanshu_jhaloya Indore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024