Drupal Coding Standards Issues | phpcs

Created on 2 February 2023, over 1 year ago
Updated 8 February 2023, over 1 year ago

Problem/Motivation

Getting Following errors/warnings

$ phpcs --standard=Drupal tencentcloud_captcha

FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\actions.js
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
  4 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 23 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 25 | ERROR | [x] Space found before semicolon; expected "return;" but found
    |       |     "return ;"
 33 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
    |       |     found "true"
 36 | ERROR | [x] Functions must not contain multiple empty lines in a row;
    |       |     found 2 empty lines
 55 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 57 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\js\prepare.js
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but found
    |       |     "\r\n"
  9 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
    |       |     found "false"
 11 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: C:\Users\Admin\Desktop\task\tencentcloud_captcha\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: 439ms; Memory: 8MB

Proposed resolution

Fix the errors and warnings.

📌 Task
Status

Fixed

Version

2.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