Fix the issue reported by phpcs

Created on 3 August 2023, over 1 year ago
Updated 14 August 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\project_10\web\themes\contrib\rhythm\assets\bootstrap\css\bootstrap.css
---------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------
 3593 | ERROR | Style definitions must end with a semicolon
 6409 | ERROR | Style definitions must end with a semicolon
 6418 | ERROR | Style definitions must end with a semicolon
---------------------------------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\themes\contrib\rhythm\assets\style.css
---------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 10 LINES
---------------------------------------------------------------------------
  76 | ERROR | More than 2 empty lines are not allowed
 122 | ERROR | Style definitions must end with a semicolon
 126 | ERROR | Style definitions must end with a semicolon
 145 | ERROR | More than 2 empty lines are not allowed
 196 | ERROR | Style definitions must end with a semicolon
 220 | ERROR | More than 2 empty lines are not allowed
 221 | ERROR | More than 2 empty lines are not allowed
 251 | ERROR | More than 2 empty lines are not allowed
 252 | ERROR | More than 2 empty lines are not allowed
 253 | ERROR | More than 2 empty lines are not allowed
---------------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\themes\contrib\rhythm\rhythm.theme
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
 42 | ERROR | Doc comment is empty
-----------------------------------------------------------------------


FILE: D:\xampp\htdocs\project_10\web\themes\contrib\rhythm\theme-settings.php
--------------------------------------------------------------------------------------
FOUND 33 ERRORS AND 14 WARNINGS AFFECTING 39 LINES
--------------------------------------------------------------------------------------
   1 | ERROR   | [x] Missing file doc comment
   1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
   6 | ERROR   | [x] Expected 1 space before opening brace; found 0
   8 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  12 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  15 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  18 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  21 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  24 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  28 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  34 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  37 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  39 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  42 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  44 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  47 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  49 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  52 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  54 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  57 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  61 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  63 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  66 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  72 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  75 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  77 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  80 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  82 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  85 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  87 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  90 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  92 | WARNING | [x] A comma should follow the last multiline array item. Found: )
  95 | ERROR   | [x] Expected 1 space before "=>"; 0 found
 102 | ERROR   | [x] Expected 1 space before "=>"; 0 found
 105 | WARNING | [x] A comma should follow the last multiline array item. Found: )
 108 | ERROR   | [x] Expected 1 space before "=>"; 0 found
 112 | ERROR   | [x] Expected 1 space before "=>"; 0 found
 117 | ERROR   | [x] Expected 1 space after FOR keyword; 0 found
 117 | ERROR   | [x] Expected 1 space before "="; 0 found
 117 | ERROR   | [x] Expected 1 space after "="; 0 found
 117 | ERROR   | [x] Expected 1 space after first semicolon of FOR loop; 0 found
 117 | ERROR   | [x] Expected 1 space before "<="; 0 found
 117 | ERROR   | [x] Expected 1 space after "<="; 0 found
 117 | ERROR   | [x] Expected 1 space after second semicolon of FOR loop; 0 found
 117 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
 119 | ERROR   | [x] Expected 1 space before "=>"; 0 found
 126 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 47 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------

Steps to reproduce

Run following command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml rhythm/

Proposed resolution

Above error/warnings need to be fixed.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India arti_parmar

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

Comments & Activities

Production build 0.71.5 2024