Drupal Coding Standards Issues | phpcs

Created on 20 February 2023, about 2 years ago

Problem/Motivation

Getting following error/warnings.

FILE: /var/www/html/modules/contrib/bulk_edit_terms/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
59 | WARNING | Line exceeds 80 characters; contains 83 characters
----------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/bulk_edit_terms/src/Form/NodeSelectTerms.php
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
35 | ERROR | [x] Expected "\Drupal\Core\Entity\EntityTypeManager" but found "\Drupal\Core\Entity\EntityTypeManager;" for @var tag in member variable comment
44 | ERROR | [x] Tag value indented incorrectly; expected 1 space but found 2
138 | WARNING | [ ] Only string literals should be passed to t() where possible
150 | WARNING | [ ] Only string literals should be passed to t() where possible
159 | WARNING | [ ] Only string literals should be passed to t() where possible
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/bulk_edit_terms/src/Plugin/Action/EditTermsNode.php
---------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
50 | ERROR | [x] Data types in @param tags need to be fully namespaced
---------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------

Time: 1.24 secs; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above error/warnings need to be fixed.

📌 Task
Status

Closed: outdated

Version

1.4

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

Comments & Activities

Production build 0.71.5 2024