Drupal Coding Standards Issues | phpcs

Created on 25 November 2022, almost 2 years ago
Updated 27 June 2024, 5 months ago

Getting following error/warnings

FILE: /app/modules/contrib/easy_breadcrumb/easy_breadcrumb.module
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
48 | ERROR | [x] Expected 1 space after IF keyword; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbBuilder.php
--------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
--------------------------------------------------------------------------------------------------
274 | ERROR | [x] Whitespace found at end of line
294 | ERROR | [x] Expected 1 space after IF keyword; 0 found
360 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
887 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
899 | WARNING | [x] There must be no blank line following an inline comment
899 | WARNING | [ ] There must be no blank line following an inline comment
900 | ERROR | [x] Whitespace found at end of line
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbConstants.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
145 | WARNING | Line exceeds 80 characters; contains 96 characters
--------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/EasyBreadcrumbStructuredDataJsonLd.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/Form/EasyBreadcrumbGeneralSettingsForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
128 | ERROR | [x] Opening brace must be the last content on the line
128 | ERROR | [x] There should be no white space after an opening "{"
128 | ERROR | [x] There should be no white space before a closing "}"
128 | ERROR | [x] Closing brace must be on a line by itself
128 | WARNING | [ ] Menu::loadMultiple calls should be avoided in classes, use dependency injection instead
128 | ERROR | [x] Each PHP statement must be on a line by itself
134 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
377 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/src/TitleResolver.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /app/modules/contrib/easy_breadcrumb/tests/src/Kernel/EasyBreadcrumbBuilderTest.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | The array declaration extends to column 83 (the limit is 80). The array content should be split up over multiple lines
-------------------------------------------------------------------------------------------------------------------------------------

Time: 922ms; Memory: 18MB

🐛 Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024