Drupal Coding Standard Fixes As Per PHPCS

Created on 10 June 2022, over 2 years ago
Updated 4 August 2024, 5 months ago

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

FILE: C:\xampp\htdocs\contribution\web\themes\contrib\handicraft_zymphonies_theme\handicraft_zymphonies_theme.theme
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 35 ERRORS AND 2 WARNINGS AFFECTING 30 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
13 | ERROR | [x] There must be no blank lines after the function comment
17 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
22 | ERROR | [x] Expected 1 space after ELSEIF keyword; 0 found
34 | ERROR | [x] Expected 1 space after ELSEIF keyword; 0 found
68 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
72 | ERROR | [x] Use null coalesce operator instead of ternary operator.
73 | ERROR | [x] Whitespace found at end of line
75 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
77 | ERROR | [x] Expected one space after the comma, 0 found
89 | ERROR | [x] There should be no white space after an opening "{"
89 | ERROR | [x] Comments may not appear after statements
96 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
97 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
105 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
110 | ERROR | [x] Concat operator must be surrounded by a single space
110 | ERROR | [x] Expected one space after the comma, 0 found
126 | ERROR | [x] Concat operator must be surrounded by a single space
137 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
140 | WARNING | [x] A comma should follow the last multiline array item. Found: '


Advanced Theme Settings

Clear cache after making any changes in theme
| | settings. Click here to clear cache

'
142 | ERROR | [x] Whitespace found at end of line
143 | ERROR | [x] No space found before comment text; expected "// Slide show configure" but found "//Slide show configure"
143 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
143 | ERROR | [x] Whitespace found at end of line
159 | ERROR | [x] Whitespace found at end of line
161 | ERROR | [x] Concat operator must be surrounded by a single space
170 | ERROR | [x] Concat operator must be surrounded by a single space
170 | ERROR | [x] Expected one space after the comma, 0 found
176 | ERROR | [x] Expected one space after the comma, 0 found
181 | ERROR | [x] Expected one space after the comma, 0 found
185 | ERROR | [x] Concat operator must be surrounded by a single space
185 | ERROR | [x] Expected one space after the comma, 0 found
186 | ERROR | [x] Expected 1 space after IF keyword; 0 found
186 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
199 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
238 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
252 | ERROR | [x] Expected 1 newline at end of file; 0 found

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India Rakhi Soni

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied patch #2 but there are many PHPCS error in the theme.

    āžœ  handicraft_zymphonies_theme git:(1.0.x) curl https://www.drupal.org/files/issues/2022-06-10/Drupal_coding_standard_fixes_as_per_phpcs-3285004-1.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  9889  100  9889    0     0  17084      0 --:--:-- --:--:-- --:--:-- 17258
    patching file handicraft_zymphonies_theme.theme
    āžœ  handicraft_zymphonies_theme git:(1.0.x) āœ— ..
    āžœ  themes git:(2.1.x) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml handicraft_zymphonies_theme
    
    FILE: ...subing-subing/provus/web/themes/handicraft_zymphonies_theme/css/global.css
    --------------------------------------------------------------------------------
    FOUND 1422 ERRORS AFFECTING 601 LINES
    --------------------------------------------------------------------------------
        3 | ERROR | [x] Whitespace found at end of line
        4 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
        5 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
        6 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
        7 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
        8 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
        8 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
        9 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       93 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
       94 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       94 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
       95 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       95 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
       96 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       96 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
       97 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
       98 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
       98 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      102 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      102 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      102 | ERROR | [ ] Style definitions must end with a semicolon
      107 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      107 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      107 | ERROR | [ ] Style definitions must end with a semicolon
      111 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      111 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      112 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      112 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      112 | ERROR | [ ] Style definitions must end with a semicolon
      118 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      118 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      119 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      119 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      120 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      120 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      120 | ERROR | [ ] Style definitions must end with a semicolon
      125 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      125 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      125 | ERROR | [ ] Style definitions must end with a semicolon
      132 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      132 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      133 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      133 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      133 | ERROR | [ ] Style definitions must end with a semicolon
      137 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      137 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      137 | ERROR | [ ] Style definitions must end with a semicolon
      153 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      153 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      153 | ERROR | [ ] Style definitions must end with a semicolon
      157 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      157 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      158 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      158 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      159 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      159 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      160 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      160 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      161 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      161 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      162 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      162 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      163 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      163 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      164 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      164 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      164 | ERROR | [ ] Style definitions must end with a semicolon
      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
      168 | ERROR | [ ] Style definitions must end with a semicolon
      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
      174 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      174 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      174 | ERROR | [ ] Style definitions must end with a semicolon
      178 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      178 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      178 | ERROR | [ ] Style definitions must end with a semicolon
      182 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      182 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      183 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      183 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      184 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      184 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      185 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      185 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      185 | ERROR | [ ] Style definitions must end with a semicolon
      189 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      189 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      190 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      190 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      191 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      191 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      192 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      192 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      192 | ERROR | [ ] Style definitions must end with a semicolon
      196 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      196 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      197 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      197 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      198 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      198 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      199 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      199 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      199 | ERROR | [ ] Style definitions must end with a semicolon
      203 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      203 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      203 | ERROR | [ ] Style definitions must end with a semicolon
      207 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      207 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      207 | ERROR | [ ] Style definitions must end with a semicolon
      211 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      211 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      212 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      212 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      212 | ERROR | [ ] Style definitions must end with a semicolon
      216 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      216 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      216 | ERROR | [ ] Style definitions must end with a semicolon
      220 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      220 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      220 | ERROR | [ ] Style definitions must end with a semicolon
      224 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      224 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      224 | ERROR | [ ] Style definitions must end with a semicolon
      228 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      228 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      229 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      229 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      230 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      230 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      230 | ERROR | [ ] Style definitions must end with a semicolon
      234 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      234 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      235 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      235 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      235 | ERROR | [ ] Style definitions must end with a semicolon
      239 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      239 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      240 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      240 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      241 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      241 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      242 | ERROR | [x] Spaces must b

    These are just a snippet of some of the errors because its too long if I list all of them, I will move this to needs work for that matter or does the PHPCS issues were fixed in the latest versions?

Production build 0.71.5 2024