Fix the issues reported by phpcs

Created on 2 May 2023, over 1 year ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

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

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/src/SeedsManager.php
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
113 | WARNING | Unused variable $settings_url.
-------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/src/Form/SeedsToolbarSettingsForm.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 16 WARNINGS AFFECTING 16 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
33 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
36 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
38 | WARNING | #options values usually have to run through t() for translation
39 | WARNING | #options values usually have to run through t() for translation
46 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
48 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
53 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
55 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
60 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
62 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
67 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
69 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
74 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
76 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
83 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/seeds_toolbar.module
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 4 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
245 | ERROR | [ ] The array declaration extends to column 158 (the limit is 80). The array content should be split up over multiple lines
281 | WARNING | [ ] Line exceeds 80 characters; contains 106 characters
282 | WARNING | [ ] Line exceeds 80 characters; contains 122 characters
287 | ERROR | [x] Expected one space after the comma, 0 found
287 | ERROR | [x] Space found before comma in argument list
289 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
290 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
298 | WARNING | [x] 'TODO: Find a more dynamic way to build menus.' should match the format '@todo Fix problem X here.'
339 | WARNING | [ ] Line exceeds 80 characters; contains 118 characters
---------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/assets/css/seeds-toolbar-rtl.css
-------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------
16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
20 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
79 | ERROR | [x] Multiple selectors should each be on a single line
85 | ERROR | [x] Multiple selectors should each be on a single line
110 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/assets/css/seeds-toolbar.css
--------------------------------------------------------------------------------------------
FOUND 67 ERRORS AFFECTING 61 LINES
--------------------------------------------------------------------------------------------
51 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
80 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
82 | ERROR | [x] Multiple selectors should each be on a single line
88 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
90 | ERROR | [x] Multiple selectors should each be on a single line
91 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff4 but found #FFF4
93 | ERROR | [x] Multiple selectors should each be on a single line
93 | ERROR | [x] Multiple selectors should each be on a single line
93 | ERROR | [x] Multiple selectors should each be on a single line
97 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
99 | ERROR | [x] Multiple selectors should each be on a single line
102 | ERROR | [x] Multiple selectors should each be on a single line
106 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
109 | ERROR | [x] Multiple selectors should each be on a single line
114 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
120 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
125 | ERROR | [x] Multiple selectors should each be on a single line
129 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
138 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
158 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
160 | ERROR | [x] Multiple selectors should each be on a single line
160 | ERROR | [x] Multiple selectors should each be on a single line
163 | ERROR | [x] Multiple selectors should each be on a single line
163 | ERROR | [x] Multiple selectors should each be on a single line
176 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
187 | ERROR | [x] Multiple selectors should each be on a single line
187 | ERROR | [x] Multiple selectors should each be on a single line
187 | ERROR | [x] Multiple selectors should each be on a single line
370 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
377 | ERROR | [x] Multiple selectors should each be on a single line
389 | ERROR | [x] Multiple selectors should each be on a single line
393 | ERROR | [x] Multiple selectors should each be on a single line
397 | ERROR | [x] Multiple selectors should each be on a single line
402 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
404 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 5
405 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
406 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
409 | ERROR | [x] Multiple selectors should each be on a single line
413 | ERROR | [x] Multiple selectors should each be on a single line
414 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
417 | ERROR | [x] Multiple selectors should each be on a single line
451 | ERROR | [x] Multiple selectors should each be on a single line
468 | ERROR | [x] Multiple selectors should each be on a single line
471 | ERROR | [x] Multiple selectors should each be on a single line
474 | ERROR | [x] Multiple selectors should each be on a single line
492 | ERROR | [x] Multiple selectors should each be on a single line
496 | ERROR | [x] Multiple selectors should each be on a single line
499 | ERROR | [x] Multiple selectors should each be on a single line
522 | ERROR | [x] Multiple selectors should each be on a single line
525 | ERROR | [x] Multiple selectors should each be on a single line
561 | ERROR | [x] Multiple selectors should each be on a single line
578 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
582 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
593 | ERROR | [x] Multiple selectors should each be on a single line
596 | ERROR | [x] Multiple selectors should each be on a single line
619 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
621 | ERROR | [x] Multiple selectors should each be on a single line
626 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
639 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
682 | ERROR | [x] Multiple selectors should each be on a single line
687 | ERROR | [x] Multiple selectors should each be on a single line
701 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
702 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
713 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 10
740 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
741 | ERROR | [x] CSS colours must be defined in lowercase; expected #fff but found #FFF
757 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 67 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/templates/seeds-toolbar-help.html.twig
-------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
64 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/seeds_toolbar.install
-------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------
23 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
24 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

FILE: /var/www/html/vbd9/web/modules/contrib/seeds_toolbar/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
19 | WARNING | Line exceeds 80 characters; contains 115 characters
22 | WARNING | Line exceeds 80 characters; contains 170 characters
25 | WARNING | Line exceeds 80 characters; contains 112 characters
31 | WARNING | Line exceeds 80 characters; contains 105 characters
----------------------------------------------------------------------

Time: 1.12 secs; Memory: 18MB

Steps to reproduce

Proposed resolution

RUN:

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

Remaining tasks

User interface changes

API changes

Data model changes

📌 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