Drupal Coding Standards Issues | phpcs

Created on 31 January 2023, over 1 year ago
Updated 1 February 2023, over 1 year ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal change_field_type

FILE: ...sers\Admin\Desktop\task\change_field_type\src\Form\ChangeFieldTypeForm.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
 146 | ERROR   | [x] 4 spaces found before inline comment; expected "//
     |         |     $view_storage =
     |         |     $this->entityTypeManager->getStorage('view');" but found
     |         |     "//    $view_storage =
     |         |     $this->entityTypeManager->getStorage('view');"
 147 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
 149 | WARNING | [x] There must be no blank line following an inline comment
 232 | ERROR   | [x] Array indentation error, expected 10 spaces but found 12
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 474ms; Memory: 10MB

Proposed resolution

Fix the errors and warnings.

📌 Task
Status

Needs review

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