- Issue created by @Rohit Rana
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 11:15am 16 February 2023 - Status changed to Needs work
about 2 years ago 12:16pm 16 February 2023 - 🇮🇳India mrinalini9 New Delhi
Hi,
I have reviewed patch #2, it applied cleanly but still getting below coding standard issues:
FILE: /Documents/jstimer/config/install/jstimer.settings.yml ----------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------- 14 | ERROR | [x] Expected 1 newline at end of file; 2 found ----------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------- FILE: /Documents/jstimer/jstimer.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 55 ERRORS AND 7 WARNINGS AFFECTING 49 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 1 | ERROR | [x] Missing file doc comment 3 | ERROR | [x] There must be one blank line after the last USE statement; 0 found; 12 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 17 | ERROR | [x] Case breaking statements must be followed by a single blank line 19 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4 32 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 36 | ERROR | [x] Short array syntax must be used to define arrays 37 | ERROR | [x] Short array syntax must be used to define arrays 38 | ERROR | [x] Short array syntax must be used to define arrays 38 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 39 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 43 | ERROR | [x] Expected 1 blank line after function; 2 found 46 | ERROR | [x] Missing function doc comment 47 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed 47 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1 48 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed 48 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1 53 | ERROR | [x] There should be no white space after an opening "(" 53 | ERROR | [x] There should be no white space before a closing ")" 59 | ERROR | [x] There should be no white space after an opening "(" 59 | ERROR | [x] There should be no white space before a closing ")" 63 | ERROR | [x] There should be no white space after an opening "(" 63 | ERROR | [x] There should be no white space before a closing ")" 69 | ERROR | [x] Expected 1 blank line after function; 2 found 73 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 73 | ERROR | [x] Doc comment short description must end with a full stop 76 | ERROR | [x] Short array syntax must be used to define arrays 78 | ERROR | [x] Short array syntax must be used to define arrays 82 | ERROR | [x] Short array syntax must be used to define arrays 83 | ERROR | [x] Short array syntax must be used to define arrays 88 | ERROR | [x] Expected 1 blank line after function; 2 found 91 | ERROR | [x] Missing function doc comment 93 | ERROR | [x] Expected 1 blank line after function; 2 found 97 | ERROR | [x] Doc comment short description must start with a capital letter 99 | ERROR | [ ] Missing parameter type 101 | ERROR | [x] Separate the @param and @return sections by a blank line. 102 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters 104 | ERROR | [x] Incorrect spacing between argument "$format_string" and equals sign; expected 1 but found 0 104 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$format_string"; expected 1 but found 0 105 | ERROR | [x] Expected 1 space after "="; 6 found 105 | ERROR | [x] Short array syntax must be used to define arrays 106 | ERROR | [x] Short array syntax must be used to define arrays 106 | ERROR | [x] There should be no white space before a closing ")" 108 | ERROR | [x] Expected 1 blank line after function; 2 found 112 | ERROR | [x] Doc comment short description must start with a capital letter 118 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 122 | ERROR | [x] Concat operator must be surrounded by a single space 123 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with t() for variables 123 | ERROR | [x] Concat operator must be surrounded by a single space 125 | ERROR | [x] Concat operator must be surrounded by a single space 129 | ERROR | [x] Concat operator must be surrounded by a single space 131 | ERROR | [x] Concat operator must be surrounded by a single space 132 | ERROR | [x] Expected 1 blank line after function; 2 found 138 | ERROR | [x] Expected "array" but found "Array" for function return type 145 | ERROR | [x] Inline comments must start with a capital letter 145 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 150 | ERROR | [x] Expected 1 blank line after function; 2 found 155 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 162 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 166 | ERROR | [x] Short array syntax must be used to define arrays 166 | ERROR | [x] PHP keywords must be lowercase; expected "array" but found "Array" 173 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 55 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Documents/jstimer/jstimer.install ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 13 ERRORS AND 8 WARNINGS AFFECTING 15 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 7 | ERROR | [x] There must be exactly one blank line after the file comment 13 | ERROR | [x] Expected 1 blank line before function; 2 found 14 | ERROR | [x] Short array syntax must be used to define arrays 27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 28 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 30 | WARNING | [x] There must be no blank line following an inline comment 30 | WARNING | [ ] There must be no blank line following an inline comment 30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 38 | WARNING | [ ] Unused variable $msg. 40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 41 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters 41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 43 | WARNING | [x] There must be no blank line following an inline comment 43 | WARNING | [ ] There must be no blank line following an inline comment 43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 46 | ERROR | [x] Expected 1 blank line after function; 2 found 50 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Documents/jstimer/README.txt ----------------------------------------------------------------------------------------------------------------- FOUND 15 ERRORS AND 16 WARNINGS AFFECTING 28 LINES ----------------------------------------------------------------------------------------------------------------- 74 | ERROR | [x] Short array syntax must be used to define arrays 76 | ERROR | [x] Short array syntax must be used to define arrays 77 | WARNING | [x] A comma should follow the last multiline array item. Found: '2015-05-02T08:11:00-08:00' 78 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 84 | ERROR | [x] Short array syntax must be used to define arrays 86 | ERROR | [x] Short array syntax must be used to define arrays 87 | ERROR | [x] Array indentation error, expected 4 spaces but found 2 89 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 96 | ERROR | [x] Short array syntax must be used to define arrays 98 | ERROR | [x] Short array syntax must be used to define arrays 100 | ERROR | [x] Expected 1 space before "=>"; 0 found 100 | ERROR | [x] Expected 1 space after "=>"; 0 found 100 | WARNING | [x] A comma should follow the last multiline array item. Found: 'up' 101 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 107 | ERROR | [x] Short array syntax must be used to define arrays 109 | ERROR | [x] Short array syntax must be used to define arrays 111 | ERROR | [x] Expected 1 space before "=>"; 0 found 111 | ERROR | [x] Expected 1 space after "=>"; 0 found 112 | WARNING | [x] A comma should follow the last multiline array item. Found: '%sign%%hours%::%mins%::%secs%' 113 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 119 | ERROR | [x] Short array syntax must be used to define arrays 121 | ERROR | [x] Short array syntax must be used to define arrays 123 | WARNING | [x] A comma should follow the last multiline array item. Found: 200 124 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 130 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters 156 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters 157 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters 158 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters 159 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters 160 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters 161 | WARNING | [ ] Line exceeds 80 characters; contains 115 characters ----------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------- FILE: /Documents/jstimer/widgets/jst_clock.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 45 ERRORS AND 5 WARNINGS AFFECTING 41 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 6 | ERROR | [x] There must be exactly one blank line after the file comment 10 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 17 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 263 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 264 | ERROR | [x] Expected 1 blank line after function; 2 found 268 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 269 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 273 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 275 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 275 | ERROR | [x] Short array syntax must be used to define arrays 276 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 277 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 278 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 281 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 281 | ERROR | [x] Short array syntax must be used to define arrays 285 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 285 | ERROR | [x] Short array syntax must be used to define arrays 289 | ERROR | [x] Short array syntax must be used to define arrays 289 | ERROR | [ ] The array declaration extends to column 134 (the limit is 80). The array content should be split up over multiple lines 290 | WARNING | [x] A comma should follow the last multiline array item. Found: ) 293 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 293 | ERROR | [x] Short array syntax must be used to define arrays 294 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 295 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 296 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 297 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 300 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 302 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters 307 | ERROR | [x] Missing function doc comment 314 | ERROR | [x] Expected 1 blank line after function; 2 found 317 | ERROR | [x] Missing function doc comment 319 | ERROR | [x] Short array syntax must be used to define arrays 321 | ERROR | [x] There should be no white space after an opening "(" 321 | ERROR | [x] There should be no white space before a closing ")" 322 | ERROR | [x] Concat operator must be surrounded by a single space 322 | ERROR | [x] Concat operator must be surrounded by a single space 322 | ERROR | [x] Concat operator must be surrounded by a single space 322 | ERROR | [x] Concat operator must be surrounded by a single space 327 | ERROR | [x] Expected 1 blank line after function; 2 found 331 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 333 | ERROR | [ ] jst_clock_install() is an installation hook and must be declared in an install file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 43 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Documents/jstimer/widgets/jst_timer.info.yml ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------- 6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:" ---------------------------------------------------------------------------------------------- FILE: /Documents/jstimer/widgets/jst_timer.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 84 ERRORS AND 8 WARNINGS AFFECTING 80 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 5 | ERROR | [x] Function comment short description must start with exactly one space 6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 7 | ERROR | [x] There must be exactly one blank line after the file comment 11 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 19 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 21 | ERROR | [x] Short array syntax must be used to define arrays 23 | WARNING | [x] A comma should follow the last multiline array item. Found: '' 25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 30 | ERROR | [x] Inline comments must start with a capital letter 30 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 31 | ERROR | [x] Concat operator must be surrounded by a single space 33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 35 | ERROR | [x] Concat operator must be surrounded by a single space 36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 314 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 0 315 | ERROR | [x] Expected 1 blank line after function; 2 found 319 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 320 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 329 | ERROR | [x] Short array syntax must be used to define arrays 332 | WARNING | [x] A comma should follow the last multiline array item. Found: 1 335 | ERROR | [x] Short array syntax must be used to define arrays 340 | ERROR | [x] Array indentation error, expected 4 spaces but found 6 341 | ERROR | [x] Array indentation error, expected 4 spaces but found 6 348 | ERROR | [x] Short array syntax must be used to define arrays 349 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 350 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 351 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 352 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 356 | ERROR | [x] Short array syntax must be used to define arrays 359 | ERROR | [x] Short array syntax must be used to define arrays 365 | ERROR | [x] Short array syntax must be used to define arrays 368 | ERROR | [x] Short array syntax must be used to define arrays 373 | ERROR | [x] Short array syntax must be used to define arrays 381 | ERROR | [x] Short array syntax must be used to define arrays 387 | ERROR | [x] Short array syntax must be used to define arrays 392 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use '' quotes instead 394 | ERROR | [x] Short array syntax must be used to define arrays 401 | ERROR | [x] Short array syntax must be used to define arrays 406 | ERROR | [x] Short array syntax must be used to define arrays 412 | ERROR | [x] Short array syntax must be used to define arrays 421 | ERROR | [x] Short array syntax must be used to define arrays 427 | ERROR | [x] Short array syntax must be used to define arrays 432 | ERROR | [x] Short array syntax must be used to define arrays 435 | ERROR | [x] Short array syntax must be used to define arrays 442 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines 445 | ERROR | [x] Short array syntax must be used to define arrays 451 | ERROR | [x] Short array syntax must be used to define arrays 457 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines 460 | ERROR | [x] Short array syntax must be used to define arrays 466 | ERROR | [x] Short array syntax must be used to define arrays 475 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters 479 | ERROR | [x] Missing function doc comment 502 | ERROR | [x] Expected 1 blank line after function; 2 found 505 | ERROR | [x] Missing function doc comment 507 | ERROR | [x] There should be no white space before a closing ")" 510 | ERROR | [x] Short array syntax must be used to define arrays 510 | ERROR | [ ] The array declaration extends to column 168 (the limit is 80). The array content should be split up over multiple lines 512 | ERROR | [x] There should be no white space after an opening "(" 512 | ERROR | [x] There should be no white space before a closing ")" 513 | ERROR | [x] Concat operator must be surrounded by a single space 513 | ERROR | [x] Concat operator must be surrounded by a single space 513 | ERROR | [x] Concat operator must be surrounded by a single space 513 | ERROR | [x] Concat operator must be surrounded by a single space 518 | ERROR | [x] Expected 1 blank line after function; 2 found 522 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements | | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 524 | ERROR | [ ] jst_timer_install() is an installation hook and must be declared in an install file 527 | ERROR | [x] Expected 1 blank line after function; 2 found 533 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph 534 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment 534 | ERROR | [ ] Return type missing for @return tag in function comment 538 | WARNING | [ ] Unused variable $translate. 538 | ERROR | [x] Short array syntax must be used to define arrays 546 | ERROR | [x] Expected 1 blank line after function; 2 found 550 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found 551 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found 553 | ERROR | [x] Short array syntax must be used to define arrays 559 | ERROR | [x] Expected 1 blank line after function; 2 found 563 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found 564 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 80 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Documents/jstimer/widgets/jst_clock.info.yml ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------- 6 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:" ---------------------------------------------------------------------------------------------- FILE: /Documents/jstimer/src/Form/JstimerAdminSettings.php ------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------- 71 | ERROR | Public method name "JstimerAdminSettings::_submitForm" is not in lowerCamel format -------------------------------------------------------------------------------------------------
Please fix these issues.
Thanks & Regards,
Mrinalini - Assigned to annmarysruthy
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 4:45am 20 February 2023 - Assigned to sourabhjain
- Issue was unassigned.
- 🇧🇷Brazil isa.bel Balneário Camboriú
I created another Merge Request to run phpcs against the latest version of the module.
All adjustments have been made.
Ready to be reviewed - 🇬🇧United Kingdom nexusnovaz
Hi @isa.bel
It seems there is still some more to go. I reccomend using phpcs in your local environment as you go to fix all the issues.
I'm going to attach a file to this (phpcs_output.txt), for ease but you can also see the output below:
FILE: /var/www/html/web/modules/custom/jstimer/jstimer.module -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 12 ERRORS AND 2 WARNINGS AFFECTING 10 LINES -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] Missing file doc comment (Drupal.Commenting.FileComment.Missing) 3 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse) 3 | ERROR | [x] There must be one blank line after the last USE statement; 0 found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 12 | ERROR | [x] Expected 1 blank line before function; 0 found (Squiz.WhiteSpace.FunctionSpacing.Before) 31 | ERROR | [x] Doc comment short description must start with a capital letter (Drupal.Commenting.DocComment.ShortNotCapital) 33 | ERROR | [ ] Missing parameter type (Drupal.Commenting.FunctionComment.MissingParamType) 35 | ERROR | [x] Separate the @param and @return sections by a blank line. (Drupal.Commenting.DocComment.TagGroupSpacing) 36 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters (Drupal.Files.LineLength.TooLong) 38 | ERROR | [x] Incorrect spacing between argument "$format_string" and equals sign; expected 1 but found 0 (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals) 38 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$format_string"; expected 1 but found 0 (Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals) 39 | ERROR | [x] Expected 1 space after "="; 6 found (Squiz.WhiteSpace.OperatorSpacing.SpacingAfter) 39 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 40 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 40 | ERROR | [x] There should be no white space before a closing ")" (Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/custom/jstimer/modules/jst_clock/jst_clock.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 21 ERRORS AND 3 WARNINGS AFFECTING 19 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 11 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." (Drupal.Commenting.HookComment.HookCommentFormat) 12 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph (Drupal.Commenting.DocComment.ShortSingleLine) 16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 18 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 19 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 20 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 21 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 24 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 28 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 32 | ERROR | [ ] The array declaration extends to column 134 (the limit is 120). The array content should be split up over multiple lines (Drupal.Arrays.Array.LongLineDeclaration) 32 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 33 | WARNING | [x] A comma should follow the last multiline array item. Found: ) (Drupal.Arrays.Array.CommaLastItem) 36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 36 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 37 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 38 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 39 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 40 | ERROR | [x] Array indentation error, expected 6 spaces but found 8 (Drupal.Arrays.Array.ArrayIndentation) 43 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4 (Drupal.WhiteSpace.ScopeIndent.IncorrectExact) 45 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters (Drupal.Files.LineLength.TooLong) 50 | ERROR | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/modules/custom/jstimer/modules/jst_timer/jst_timer.module ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 52 ERRORS AND 5 WARNINGS AFFECTING 55 LINES ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 5 | ERROR | [x] Function comment short description must start with exactly one space (Drupal.Commenting.DocComment.ShortStartSpace) 6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph (Drupal.Commenting.DocComment.ShortSingleLine) 7 | ERROR | [x] There must be exactly one blank line after the file comment (Drupal.Commenting.FileComment.SpacingAfterComment) 9 | WARNING | [x] Unused use statement (Drupal.Classes.UnusedUseStatement.UnusedUse) 9 | ERROR | [x] When importing a class with "use", do not include a leading \ (Drupal.Classes.UseLeadingBackslash.SeparatorStart) 12 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." (Drupal.Commenting.HookComment.HookCommentFormat) 13 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph (Drupal.Commenting.DocComment.ShortSingleLine) 22 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 25 | WARNING | [x] A comma should follow the last multiline array item. Found: 1 (Drupal.Arrays.Array.CommaLastItem) 28 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 33 | ERROR | [x] Array indentation error, expected 4 spaces but found 6 (Drupal.Arrays.Array.ArrayIndentation) 34 | ERROR | [x] Array indentation error, expected 4 spaces but found 6 (Drupal.Arrays.Array.ArrayIndentation) 41 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 42 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 (Drupal.Arrays.Array.ArrayIndentation) 43 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 (Drupal.Arrays.Array.ArrayIndentation) 44 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 (Drupal.Arrays.Array.ArrayIndentation) 45 | ERROR | [x] Array indentation error, expected 8 spaces but found 9 (Drupal.Arrays.Array.ArrayIndentation) 49 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 52 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 58 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 61 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 66 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 74 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 80 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 85 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use '' quotes instead (Drupal.Semantics.FunctionT.BackslashDoubleQuote) 87 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 94 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 99 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 105 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 114 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 120 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 125 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 128 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 135 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines) 138 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 144 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 150 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines) 153 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 159 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 168 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters (Drupal.Files.LineLength.TooLong) 172 | ERROR | [x] Missing function doc comment (Drupal.Commenting.FunctionComment.Missing) 200 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph (Drupal.Commenting.DocComment.ShortSingleLine) 201 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment (Drupal.Commenting.DocComment.SpacingBeforeTags) 201 | ERROR | [ ] Return type missing for @return tag in function comment (Drupal.Commenting.FunctionComment.MissingReturnType) 204 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "translate_replacements" but expected "jst_timer_translate_replacements" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 205 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 213 | ERROR | [x] Expected 1 blank line after function; 2 found (Squiz.WhiteSpace.FunctionSpacing.After) 217 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar) 218 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar) 220 | ERROR | [x] Short array syntax must be used to define arrays (Drupal.Arrays.DisallowLongArraySyntax.Found) 226 | ERROR | [x] Expected 1 blank line after function; 2 found (Squiz.WhiteSpace.FunctionSpacing.After) 230 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar) 231 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found (Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar) 253 | ERROR | [x] Concat operator must be surrounded by a single space (Squiz.Strings.ConcatenationSpacing.PaddingFound) 255 | ERROR | [x] Concat operator must be surrounded by a single space (Squiz.Strings.ConcatenationSpacing.PaddingFound) 260 | ERROR | [x] Expected 1 space after "="; 2 found (Squiz.WhiteSpace.OperatorSpacing.SpacingAfter) 285 | ERROR | [x] Expected 1 newline at end of file; 2 found (Drupal.Files.EndFileNewline.TooMany) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 49 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Time: 191ms; Memory: 6MB PHP CODE SNIFFER REPORT SUMMARY ------------------------------------------------------------------------------------------------ FILE ERRORS WARNINGS ------------------------------------------------------------------------------------------------ /var/www/html/web/modules/custom/jstimer/jstimer.module 12 2 /var/www/html/web/modules/custom/jstimer/modules/jst_clock/jst_clock.module 21 3 /var/www/html/web/modules/custom/jstimer/modules/jst_timer/jst_timer.module 52 5 ------------------------------------------------------------------------------------------------ A TOTAL OF 85 ERRORS AND 10 WARNINGS WERE FOUND IN 3 FILES ------------------------------------------------------------------------------------------------ PHPCBF CAN FIX 81 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------ PHP CODE SNIFFER VIOLATION SOURCE SUMMARY ------------------------------------------------------------------------------- SOURCE COUNT ------------------------------------------------------------------------------- [x] Drupal.Arrays.DisallowLongArraySyntax.Found 31 [x] Drupal.Arrays.Array.ArrayIndentation 13 [x] Drupal.WhiteSpace.ScopeIndent.IncorrectExact 6 [ ] Drupal.Commenting.DocComment.ShortSingleLine 4 [x] Drupal.Commenting.DocCommentAlignment.SpaceBeforeStar 4 [ ] Drupal.Files.LineLength.TooLong 3 [x] Drupal.Arrays.Array.CommaLastItem 2 [x] Drupal.Classes.UnusedUseStatement.UnusedUse 2 [x] Drupal.Commenting.FunctionComment.Missing 2 [ ] Drupal.Commenting.HookComment.HookCommentFormat 2 [x] Squiz.Strings.ConcatenationSpacing.PaddingFound 2 [x] Squiz.WhiteSpace.FunctionSpacing.After 2 [x] Squiz.WhiteSpace.OperatorSpacing.SpacingAfter 2 [x] Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines 2 [ ] Drupal.Arrays.Array.LongLineDeclaration 1 [x] Drupal.Classes.UseLeadingBackslash.SeparatorStart 1 [x] Drupal.Commenting.DocComment.ShortNotCapital 1 [x] Drupal.Commenting.DocComment.ShortStartSpace 1 [x] Drupal.Commenting.DocComment.SpacingBeforeTags 1 [x] Drupal.Commenting.DocComment.TagGroupSpacing 1 [x] Drupal.Commenting.FileComment.Missing 1 [x] Drupal.Commenting.FileComment.SpacingAfterComment 1 [ ] Drupal.Commenting.FunctionComment.MissingParamType 1 [ ] Drupal.Commenting.FunctionComment.MissingReturnType 1 [x] Drupal.Files.EndFileNewline.TooMany 1 [ ] Drupal.NamingConventions.ValidFunctionName.InvalidPrefix 1 [ ] Drupal.Semantics.FunctionT.BackslashDoubleQuote 1 [x] Drupal.WhiteSpace.CloseBracketSpacing.ClosingWhitespace 1 [x] PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse 1 [x] Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterEquals 1 [x] Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals 1 [x] Squiz.WhiteSpace.FunctionSpacing.Before 1 ------------------------------------------------------------------------------- A TOTAL OF 95 SNIFF VIOLATIONS WERE FOUND IN 32 SOURCES ------------------------------------------------------------------------------- PHPCBF CAN FIX THE 24 MARKED SOURCES AUTOMATICALLY (81 VIOLATIONS IN TOTAL) -------------------------------------------------------------------------------
- 🇬🇧United Kingdom aaron.ferris
aaron.ferris → changed the visibility of the branch 3342335-coding-standard-issues to hidden.
- 🇬🇧United Kingdom aaron.ferris
Pushing a couple of commits as in progress for this.....
- 🇬🇧United Kingdom aaron.ferris
- 🇬🇧United Kingdom aaron.ferris
Just realised this was forked from 8,x closing as duplicate.