Fix the issue reported by phpcs

Created on 27 September 2023, 9 months ago
Updated 28 September 2023, 9 months ago

Problem/Motivation

Getting following error/warnings:

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\galactic_dreamscape\css\galactic_dreamscape.css
--------------------------------------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 14 LINES
--------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
16 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
19 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
107 | ERROR | [x] Whitespace found at end of line
234 | ERROR | [x] Selectors must be on a single line
235 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
235 | ERROR | [x] Blank lines are not allowed between class names
235 | ERROR | [x] Expected 1 space before opening brace of class definition; newline found
258 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
265 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
268 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
284 | ERROR | [x] Whitespace found at end of line
360 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
392 | ERROR | [x] Expected 0 spaces before semicolon in style definition; 1 found
408 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
1497 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\galactic_dreamscape\galactic_dreamscape.theme
------------------------------------------------------------------------------------------------
FOUND 40 ERRORS AND 2 WARNINGS AFFECTING 26 LINES
------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
9 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
16 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
19 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
20 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
21 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 1
23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
24 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
24 | ERROR | [x] Array indentation error, expected 3 spaces but found 2
25 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
25 | ERROR | [x] Array indentation error, expected 3 spaces but found 2
26 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
26 | ERROR | [x] Array indentation error, expected 3 spaces but found 2
27 | ERROR | [x] Array indentation error, expected 3 spaces but found 4
28 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
30 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
39 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
40 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
168 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
168 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
169 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
169 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
170 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
170 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
171 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
171 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
172 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
172 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
173 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
173 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
176 | ERROR | [x] Missing function doc comment
191 | ERROR | [x] Expected 1 space after IF keyword; 0 found
191 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
203 | ERROR | [x] Concat operator must be surrounded by a single space
203 | ERROR | [x] Concat operator must be surrounded by a single space
214 | ERROR | [x] Whitespace found at end of line
------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 42 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\galactic_dreamscape\README.md
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 370 characters
32 | WARNING | Line exceeds 80 characters; contains 97 characters
33 | WARNING | Line exceeds 80 characters; contains 100 characters
--------------------------------------------------------------------------------

Steps to reproduce

Run following command:

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

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.69.0 2024