fix the issues reported by phpcs

Created on 16 June 2023, over 1 year ago
Updated 25 June 2023, over 1 year ago

Problem/Motivation

Getting following error/warnings

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\assets\css\content-form-rtl.css
---------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------
2 | ERROR | Style definitions must end with a semicolon
---------------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\assets\css\content-form.css
-----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------
2 | ERROR | Style definitions must end with a semicolon
-----------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\assets\css\root-rtl.css
-------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
-------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\assets\css\root.css
---------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------
1 | WARNING | File appears to be minified and cannot be processed
---------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 96 characters
15 | WARNING | Line exceeds 80 characters; contains 115 characters
18 | WARNING | Line exceeds 80 characters; contains 170 characters
21 | WARNING | Line exceeds 80 characters; contains 150 characters
24 | WARNING | Line exceeds 80 characters; contains 176 characters
27 | WARNING | Line exceeds 80 characters; contains 128 characters
----------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\root.theme
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
71 | ERROR | Doc comment is empty
80 | ERROR | Doc comment is empty
89 | ERROR | Doc comment is empty
100 | ERROR | Doc comment is empty
103 | ERROR | Invalid function name, expected ajax_dialog but found ajaxDialog
--------------------------------------------------------------------------------

FILE: D:\xampp\htdocs\drupal_10\web\themes\contrib\root\src\RootEditContent.php
-----------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
17 | ERROR | [x] Opening brace should be on the same line as the declaration
83 | ERROR | [x] There must be exactly one blank line before the tags in a doc comment
137 | ERROR | [x] Expected 1 blank line after function; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 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 root/

Proposed resolution

Above error/warnings need to be fixed

🐛 Bug report
Status

Fixed

Version

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