Fix the issues reported by phpcs

Created on 11 April 2023, over 1 year ago
Updated 26 April 2023, over 1 year ago

vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/usage_report/

FILE: /var/www/html/drupalvb/web/modules/contrib/usage_report/src/Routing/UsageReportRouteSubscriber.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [ ] Missing short description in doc comment
22 | ERROR | [ ] Missing short description in doc comment
45 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
94 | ERROR | [x] Expected 1 blank line after function; 0 found
95 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupalvb/web/modules/contrib/usage_report/src/Controller/UsageReportController.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 57 ERRORS AND 23 WARNINGS AFFECTING 64 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
18 | ERROR | [x] Missing class doc comment
27 | ERROR | [ ] Missing short description in doc comment
32 | ERROR | [ ] Missing short description in doc comment
37 | ERROR | [ ] Missing short description in doc comment
43 | ERROR | [ ] Missing short description in doc comment
46 | ERROR | [ ] Class property $rows_per_page should use lowerCamel naming without underscores
49 | ERROR | [ ] More than 2 empty lines are not allowed
50 | ERROR | [ ] Missing short description in doc comment
51 | ERROR | [ ] Missing parameter comment
52 | ERROR | [ ] Missing parameter comment
53 | ERROR | [ ] Missing parameter comment
54 | ERROR | [ ] Missing parameter comment
58 | ERROR | [x] Expected 1 blank line before function; 3 found
65 | ERROR | [x] Missing function doc comment
74 | ERROR | [ ] Missing short description in doc comment
75 | ERROR | [ ] Missing parameter comment
76 | ERROR | [ ] Missing parameter comment
77 | ERROR | [ ] Missing parameter comment
79 | ERROR | [ ] Description for the @return value is missing
87 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
87 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
94 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
101 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
108 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
111 | ERROR | [ ] The array declaration extends to column 120 (the limit is 80). The array content should be split up over multiple lines
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
122 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
122 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
129 | ERROR | [x] Missing function doc comment
130 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
142 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
156 | ERROR | [x] Inline comments must start with a capital letter
156 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
173 | ERROR | [x] Missing function doc comment
174 | ERROR | [x] Inline comments must start with a capital letter
174 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
185 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
188 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
191 | WARNING | [ ] Line exceeds 80 characters; contains 128 characters
191 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
192 | WARNING | [ ] Unused variable $usage_entity_data.
202 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
212 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
215 | WARNING | [x] A comma should follow the last multiline array item. Found: 'entity_field_info'
221 | ERROR | [x] Missing function doc comment
223 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
225 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
228 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
228 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
238 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
240 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
242 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
244 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
246 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
249 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
254 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
258 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
259 | ERROR | [ ] join() is a function name alias, use implode() instead
259 | ERROR | [ ] The array declaration extends to column 98 (the limit is 80). The array content should be split up over multiple lines
268 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
268 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
279 | ERROR | [x] Missing function doc comment
281 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
282 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
292 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
293 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
326 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
333 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
343 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
357 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
361 | ERROR | [x] Expected 1 blank line after function; 0 found
362 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 39 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupalvb/web/modules/contrib/usage_report/src/Plugin/Derivative/UsageReportLocalTasks.php
-------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
12 | ERROR | [x] Missing class doc comment
16 | ERROR | [ ] Missing short description in doc comment
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/drupalvb/web/modules/contrib/usage_report/src/Hooks/EntityTypeBuild.php
-------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
56 | ERROR | [x] Expected 1 blank line after function; 0 found
57 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

FILE: /var/www/html/drupalvb/web/modules/contrib/usage_report/usage_report.module
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------

Time: 690ms; Memory: 14MB

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India dineshkumarbollu

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