Comply with Drupal coding standards (3) (phpcs)

Created on 9 September 2023, over 1 year ago
Updated 26 September 2023, over 1 year ago

Problem/Motivation

Fix the following coding standard issues https://git.drupalcode.org/project/bootstrap_cloud/-/jobs/79688

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source
FILE: ...cloud/web/modules/custom/bootstrap_cloud/src/SubthemeManager.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
  8 | ERROR | [x] Use statements should be sorted alphabetically. The
    |       |     first wrong one is
    |       |     Drupal\Core\Extension\ThemeHandlerInterface.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 41 | ERROR | [ ] Parameter $theme_handler is not described in
    |       |     comment
    |       |     (Drupal.Commenting.FunctionComment.ParamMissingDefinition)
----------------------------------------------------------------------
Time: 251ms; Memory: 8MB
PHP CODE SNIFFER REPORT SUMMARY
----------------------------------------------------------------------
FILE                                                  ERRORS  WARNINGS
----------------------------------------------------------------------
...es/custom/bootstrap_cloud/src/SubthemeManager.php  2       0
----------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 0 WARNINGS WERE FOUND IN 6 FILES
----------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[ ] Drupal.Commenting.FunctionComment.ParamMissingDefinition     1
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.  1
----------------------------------------------------------------------
A TOTAL OF 2 SNIFF VIOLATIONS WERE FOUND IN 2 SOURCES
----------------------------------------------------------------------

Steps to reproduce

Run following command

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml bootstrap_cloud/

🐛 Bug report
Status

Fixed

Version

6.0

Component

Code

Created by

🇺🇸United States yas California 🇺🇸

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