Fix the issues reported by phpcs

Created on 17 July 2024, 7 months ago

Problem/Motivation

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

FILE: ...tml/d10/web/modules/contrib/entity_tracer/src/EntityLabelTwigExtension.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 37 | ERROR | The array declaration extends to column 87 (the limit is 80). The
    |       | array content should be split up over multiple lines
--------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/entity_tracer/entity_tracer.info.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by
   |         | drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by
   |         | drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by
   |         | drupal.org packaging automatically
--------------------------------------------------------------------------------


FILE: /var/www/html/d10/web/modules/contrib/entity_tracer/entity_tracer.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
  5 | ERROR   | [x] Use statements should be sorted alphabetically. The first
    |         |     wrong one is Drupal\Core\Link.
 31 | WARNING | [ ] Avoid backslash escaping in translatable strings when
    |         |     possible, use "" quotes instead
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 398ms; Memory: 12MB

Steps to reproduce

Run PHPCS on Config Pages module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR.

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India hetal.solanki

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

Production build 0.71.5 2024