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/

CommentFileSizeAuthor
#4 bootstrap_cloud-3386275.patch1.11 KBsarwan_verma
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

yas created an issue. See original summary.

yas’s picture

Title: Comply with Drupal coding standards (3) » Comply with Drupal coding standards (3) (phpcs)
Issue summary: View changes
yas’s picture

sarwan_verma’s picture

StatusFileSize
new1.11 KB

Hi @yas,
I have fixed this issue and also attached the patch file.
Please review and verify.

akshay.singh’s picture

Title: Comply with Drupal coding standards (3) (phpcs) » Fix the issues reported by phpcs
Category: Task » Bug report
Priority: Normal » Minor
Issue summary: View changes
Status: Active » Needs review
Issue tags: +Coding standards
yas’s picture

Title: Fix the issues reported by phpcs » Comply with Drupal coding standards (3) (phpcs)
Status: Needs review » Needs work

@sarwan

Thank you for the patch. Can you please create the MR?

@akshay.singh

Sorry, we will keep the commit message (from the title) to fix the coding standards like' Comply with Drupal coding standards' in this project.

Thanks

yas’s picture

Status: Needs work » Reviewed & tested by the community

@sarwan

Thank you for creating the MR and sorry for my late response. I have not noticed the MR since this issue status has been Needs work. Please change the status Needs review in the future when you update the issue so that you can let us know the update.

I'll merge the patch to 5.x and 6.x, and close this issue as Fixed.

  • yas committed dd3bdb16 on 6.x authored by sarwan
    Issue #3386275 by sarwan, yas: Comply with Drupal coding standards (3) (...

  • yas committed e20dff22 on 5.x authored by sarwan
    Issue #3386275 by sarwan, yas: Comply with Drupal coding standards (3) (...
yas’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.