Drupal Coding Standards Issues | phpcs

Created on 6 February 2023, about 2 years ago
Updated 26 June 2023, almost 2 years ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal simple_affiliate

FILE: ...:\Users\Admin\Desktop\task\simple_affiliate\src\Controller\SetTracking.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 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
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...dmin\Desktop\task\simple_affiliate\src\Plugin\Block\AffiliateLinkBlock.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found
    |         |     "\r\n"
 35 | WARNING | [x] A comma should follow the last multiline array item. Found:
    |         |     ]
 36 | WARNING | [x] A comma should follow the last multiline array item. Found:
    |         |     ]
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 420ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India jay jangid Jaipur

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

Comments & Activities

Production build 0.71.5 2024