Fix the issues reported by phpcs

Created on 20 July 2023, over 1 year ago
Updated 25 September 2023, about 1 year ago

Problem/Motivation


FILE: /Users/specbee/Sites/Projects/lb_accordion-3375813/lb_accordion.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/lb_accordion-3375813/lb_accordion.module
----------------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------------------
  8 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 1
 10 | ERROR   | [x] Line indented incorrectly; expected 0 spaces, found 1
 11 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 12 | ERROR   | [x] Expected 2 space(s) before asterisk; 1 found
 32 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/lb_accordion-3375813/assets/css/lb_accordion.css
-----------------------------------------------------------------------------------------------
FOUND 46 ERRORS AFFECTING 35 LINES
-----------------------------------------------------------------------------------------------
  4 | ERROR | [x] Closing brace of class definition must be on new line
  5 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
  6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  7 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
  8 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
  8 | ERROR | [x] Closing brace of class definition must be on new line
 13 | ERROR | [x] Closing brace of class definition must be on new line
 14 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
 15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 16 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 16 | ERROR | [x] Closing brace of class definition must be on new line
 17 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
 18 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
 18 | ERROR | [x] Closing brace of class definition must be on new line
 19 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
 20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 20 | ERROR | [x] CSS colours must be defined in lowercase; expected #2f2f2f but found #2F2F2F
 21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 26 | ERROR | [x] Closing brace of class definition must be on new line
 27 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
 28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
 28 | ERROR | [x] Closing brace of class definition must be on new line
 29 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 4
 30 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
 30 | ERROR | [x] CSS colours must be defined in lowercase; expected #2f2f2f but found #2F2F2F
 30 | ERROR | [x] Closing brace of class definition must be on new line
 33 | ERROR | [x] Closing brace of class definition must be on new line
 34 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
 35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 35 | ERROR | [x] Closing brace of class definition must be on new line
 42 | ERROR | [x] Closing brace of class definition must be on new line
 43 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
 44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 44 | ERROR | [x] Closing brace of class definition must be on new line
 45 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
 46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 46 | ERROR | [x] Closing brace of class definition must be on new line
 50 | ERROR | [x] Closing brace of class definition must be on new line
 53 | ERROR | [x] Closing brace of class definition must be on new line
 56 | ERROR | [x] Closing brace of class definition must be on new line
 58 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 46 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/lb_accordion-3375813/assets/js/lb_accordion.js
----------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 space before opening brace; found 0
 6 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
 9 | ERROR | [x] Expected 1 space after FUNCTION keyword; 0 found
----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------

Time: 91ms; Memory: 10MB

Steps to reproduce

Run following command
phpcs --standard=โ€œDrupal,DrupalPracticeโ€ --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js .

๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Neha Wadhwani

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024