Drupal Coding Standards Issues | phpcs

Created on 6 February 2023, over 1 year ago
Updated 22 August 2023, 11 months ago

Problem/Motivation

Getting Following errors/warnings

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

FILE: C:\Users\Admin\Desktop\task\toolbar_edit_page_button\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
  3 | WARNING | Line exceeds 80 characters; contains 316 characters
  5 | WARNING | Line exceeds 80 characters; contains 348 characters
 16 | WARNING | Line exceeds 80 characters; contains 159 characters
----------------------------------------------------------------------


FILE: ...dmin\Desktop\task\toolbar_edit_page_button\toolbar_edit_page_button.module
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
 25 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced
    |       |     with use statements
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 451ms; Memory: 10MB

Proposed resolution

Fix the errors and warnings.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Jay Jangid

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024