Drupal Coding Standards Issues | phpcs

Created on 7 February 2023, almost 2 years ago
Updated 2 March 2023, over 1 year ago

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.module
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 77 ERRORS AFFECTING 67 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
22 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 7
23 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
24 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
25 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 3
31 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
32 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
33 | ERROR | [x] Expected 2 space(s) before asterisk; 1 found
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
38 | ERROR | [x] Expected 1 space after SWITCH keyword; 0 found
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
40 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
40 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
40 | ERROR | [x] Whitespace found at end of line
41 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
42 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 16
43 | ERROR | [x] Array indentation error, expected 18 spaces but found 20
45 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
45 | ERROR | [x] Closing brace indented incorrectly; expected 16 spaces, found 12
46 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
46 | ERROR | [x] Closing brace indented incorrectly; expected 12 spaces, found 8
47 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
48 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
49 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
50 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
51 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
53 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
54 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
56 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
57 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
58 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
59 | ERROR | [x] Array indentation error, expected 22 spaces but found 24
61 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
62 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
63 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
70 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
76 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
77 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
78 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
79 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
80 | ERROR | [x] Array indentation error, expected 10 spaces but found 12
84 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
84 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 2
89 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
91 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
92 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
93 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
95 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
101 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
101 | ERROR | [x] No space found before comment text; expected "// Adds layout number to variables." but found "//Adds layout number to variables."
102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
103 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
105 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
106 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
108 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
109 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
110 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
111 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
114 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
115 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
116 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
117 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
118 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
119 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
120 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
120 | ERROR | [x] Expected 1 space after "="; 2 found
121 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
121 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found 2
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 77 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.routing.yml
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/templates/block--standard-banner.html.twig
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
57 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.links.menu.yml
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.install
-------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 48 ERRORS AND 1 WARNING AFFECTING 38 LINES
-------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
4 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
7 | ERROR | [x] Missing function doc comment
7 | ERROR | [x] Expected 1 blank line before function; 2 found
10 | ERROR | [x] No space found before comment text; expected "// Layout field" but found "//Layout field"
10 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
18 | WARNING | [x] A comma should follow the last multiline array item. Found: 'Layout 4'
23 | ERROR | [x] No space found before comment text; expected "// Banner A" but found "//Banner A"
23 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
29 | ERROR | [x] No space found before comment text; expected "// Banner B" but found "//Banner B"
29 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
34 | ERROR | [x] No space found before comment text; expected "// Banner C" but found "//Banner C"
34 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
39 | ERROR | [x] No space found before comment text; expected "// Banner D" but found "//Banner D"
39 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
44 | ERROR | [x] No space found before comment text; expected "// Banner E" but found "//Banner E"
44 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
49 | ERROR | [x] No space found before comment text; expected "// Banner F" but found "//Banner F"
49 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
54 | ERROR | [x] No space found before comment text; expected "// Banner G" but found "//Banner G"
54 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
59 | ERROR | [x] No space found before comment text; expected "// Manage display" but found "//Manage display"
59 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
65 | ERROR | [x] Missing function doc comment
72 | ERROR | [x] Expected 1 space before opening brace; found 0
72 | ERROR | [x] There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found 0 spaces
73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
76 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
77 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
78 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 5
83 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 5
84 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
94 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
96 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
97 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
99 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
100 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
101 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 5
104 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 5
106 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
107 | ERROR | [x] Line indented incorrectly; expected 5 spaces, found 3
108 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 5
112 | ERROR | [x] Line indented incorrectly; expected 7 spaces, found 5
113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
115 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
117 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 49 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/src/Form/StandardBannerForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 41 WARNINGS AFFECTING 41 LINES
------------------------------------------------------------------------------------------------------------------------------------------
108 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
114 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
128 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
131 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
139 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
143 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
147 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
151 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
173 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
176 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
183 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
187 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
191 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
213 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
216 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
223 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
227 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
231 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
251 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
254 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
261 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
265 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
269 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
289 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
292 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
299 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
303 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
307 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
325 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
328 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
335 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
339 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
357 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
360 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
367 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
371 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
380 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
387 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
396 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
419 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
540 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/README.md
------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 241 characters
29 | WARNING | Line exceeds 80 characters; contains 96 characters
30 | WARNING | Line exceeds 80 characters; contains 280 characters
31 | WARNING | Line exceeds 80 characters; contains 111 characters
------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.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: /var/www/html/contribution/web/modules/contrib/standard_banner/standard_banner.libraries.yml
--------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------
5 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India himanshu_jhaloya Indore

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