Drupal coding standard issues reported by Phpcs

Created on 31 July 2023, over 1 year ago
Updated 7 September 2023, over 1 year ago

Problem/Motivation

FILE: /home/bandana/projects/drupal/themes/contrib/tara/theme-settings.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 92 ERRORS AND 6 WARNINGS AFFECTING 76 LINES
-------------------------------------------------------------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one blank line
   1 | ERROR   | [x] Missing file doc comment
   2 | ERROR   | [x] There must be one blank line after the last USE statement; 0 found;
   7 | ERROR   | [x] Missing function doc comment
   7 | ERROR   | [x] Expected 1 blank line before function; 0 found
   9 | ERROR   | [x] Concat operator must be surrounded by a single space
   9 | ERROR   | [x] Concat operator must be surrounded by a single space
  74 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
  74 | ERROR   | [x] Whitespace found at end of line
  75 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 143 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 144 | ERROR   | [x] Array indentation error, expected 6 spaces but found 4
 145 | ERROR   | [x] Array indentation error, expected 6 spaces but found 4
 146 | ERROR   | [x] Array closing indentation error, expected 4 spaces but found 2
 221 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 225 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 226 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 227 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 228 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 229 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 232 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 233 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 237 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 238 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 239 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 240 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 241 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 244 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 245 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 249 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 250 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 251 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 252 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 253 | ERROR   | [x] Array indentation error, expected 5 spaces but found 7
 256 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 257 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 261 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 268 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 291 | ERROR   | [x] Short array syntax must be used to define arrays
 292 | ERROR   | [x] Short array syntax must be used to define arrays
 317 | ERROR   | [x] Short array syntax must be used to define arrays
 319 | ERROR   | [x] Closing parenthesis of array declaration must be on a new line
 339 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 356 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 362 | ERROR   | [x] Inline comments must start with a capital letter
 362 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 369 | ERROR   | [x] Inline comments must start with a capital letter
 369 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 376 | ERROR   | [x] Inline comments must start with a capital letter
 376 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 383 | ERROR   | [x] Inline comments must start with a capital letter
 383 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 387 | WARNING | [ ] Do not pass empty strings to t()
 390 | ERROR   | [x] Inline comments must start with a capital letter
 390 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 394 | WARNING | [ ] Do not pass empty strings to t()
 397 | ERROR   | [x] Inline comments must start with a capital letter
 397 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 404 | ERROR   | [x] Inline comments must start with a capital letter
 404 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 408 | WARNING | [ ] Do not pass empty strings to t()
 411 | ERROR   | [x] Inline comments must start with a capital letter
 411 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 415 | WARNING | [ ] Do not pass empty strings to t()
 418 | ERROR   | [x] Inline comments must start with a capital letter
 418 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 425 | ERROR   | [x] Inline comments must start with a capital letter
 425 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 433 | ERROR   | [x] Short array syntax must be used to define arrays
 434 | ERROR   | [x] Spaces must be used to indent lines; tabs are not allowed
 435 | WARNING | [x] A comma should follow the last multiline array item. Found: )
 440 | ERROR   | [x] Inline comments must start with a capital letter
 440 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 446 | ERROR   | [x] Inline comments must start with a capital letter
 446 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 452 | ERROR   | [x] Inline comments must start with a capital letter
 452 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 458 | ERROR   | [x] Inline comments must start with a capital letter
 458 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 469 | ERROR   | [x] Inline comments must start with a capital letter
 469 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 475 | ERROR   | [x] Inline comments must start with a capital letter
 475 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 481 | ERROR   | [x] Inline comments must start with a capital letter
 481 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 492 | ERROR   | [x] Inline comments must start with a capital letter
 492 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 538 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 557 | ERROR   | [ ] Inline doc block comments are not allowed; use "/* Comment */" or "// Comment" instead
 563 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 570 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 576 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 582 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 587 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 593 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 599 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 635 | WARNING | [ ] Only string literals should be passed to t() where possible
 637 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 0
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 90 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------
FILE: /home/bandana/projects/drupal/themes/contrib/tara/config/install/tara.settings.yml
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
 39 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------


FILE: /home/bandana/projects/drupal/themes/contrib/tara/tara.libraries.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 48 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /home/bandana/projects/drupal/themes/contrib/tara/tara.theme
-----------------------------------------------------------------------------------------------------------------------------
FOUND 118 ERRORS AFFECTING 62 LINES
-----------------------------------------------------------------------------------------------------------------------------
   6 | ERROR | [x] There must be exactly one blank line after the file comment
   7 | ERROR | [x] There must be one blank line after the last USE statement; 0 found;
  11 | ERROR | [x] Expected 1 blank line before function; 0 found
  12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  14 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  15 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  17 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  18 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  18 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  19 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
  20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  20 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  20 | ERROR | [x] Expected newline after closing brace
  21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  21 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
  22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  22 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  23 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  31 | ERROR | [x] You must use "/**" style comments for a function comment
  32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  33 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  34 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  36 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  39 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  40 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  40 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  41 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  42 | 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
  49 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  49 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  51 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  57 | ERROR | [x] You must use "/**" style comments for a function comment
  58 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  58 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  59 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  59 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  65 | ERROR | [x] You must use "/**" style comments for a function comment
  66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  72 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
  77 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
  80 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  80 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  83 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  83 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  84 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  84 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  85 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  85 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  86 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  86 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  87 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  87 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  87 | ERROR | [x] Expected 1 space after IF keyword; 0 found
  88 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  88 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  89 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  89 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  90 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  90 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  91 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  91 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  92 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
  94 | ERROR | [x] Expected 1 space after IF keyword; 0 found
  96 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
  97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
  97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 103 | ERROR | [x] You must use "/**" style comments for a function comment
 104 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 105 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 106 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 106 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 107 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
 108 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 108 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
 109 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 109 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 3
 109 | ERROR | [x] Array indentation error, expected 4 spaces but found 3
 110 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 111 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 111 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
 112 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
 113 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
 113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 117 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Run command > vendor/bin/phpcs --standard=Drupal --extensions=php,theme,yml themes/contrib/tara

🐛 Bug report
Status

Closed: won't fix

Version

10.0

Component

Code

Created by

🇮🇳India bandanasharma

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

Production build 0.71.5 2024