Drupal Coding Standards Issues | phpcs

Created on 31 January 2023, over 2 years ago
Updated 1 February 2023, over 2 years ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal status_dashboard_client

FILE: ...sk\status_dashboard_client\src\Access\StatusDashboardClientAccessCheck.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...status_dashboard_client\src\Controller\StatusDashboardClientController.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
--------------------------------------------------------------------------------
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
     |         |     "\r\n"
  35 | ERROR   | [x] Expected "\Symfony\Component\HttpFoundation\RequestStack"
     |         |     but found
     |         |     "\Symfony\Component\HttpFoundation\RequestStack;" for @var
     |         |     tag in member variable comment
 101 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...Users\Admin\Desktop\task\status_dashboard_client\src\Form\SettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found
   |       |     "\r\n"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 457ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India jay jangid Jaipur

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

Comments & Activities

Production build 0.71.5 2024