Drupal Coding Standards Issues | phpcs

Created on 24 January 2023, over 1 year ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal page_attach_library

FILE: ...esktop\task\page_attach_library\src\Form\PageAttachLibrarySettingsForm.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
  11 | WARNING | [ ] The class short comment should describe what the class
     |         |     does and not simply repeat the class name
 105 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 114 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 123 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
 142 | ERROR   | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 436ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

RTBC

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