Fix the issues reported by phpcs

Created on 14 July 2023, over 1 year ago
Updated 31 January 2024, 10 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig shows the following warnings/errors which should be fixed.

FILE: ./README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 16 | WARNING | Line exceeds 80 characters; contains 251 characters
----------------------------------------------------------------------


FILE: ./assets/css/style.css
----------------------------------------------------------------------
FOUND 72 ERRORS AFFECTING 39 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Whitespace found at end of line
  4 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
  4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
  8 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
  8 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 12 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 13 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 14 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 15 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 16 | ERROR | [x] Blank lines are not allowed in class definitions
 20 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 21 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 22 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, 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] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 27 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 31 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 32 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 34 | ERROR | [x] Expected 1 space before opening brace of class
    |       |     definition; 0 found
 35 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 35 | ERROR | [x] Expected 1 space after colon in style definition; 0
    |       |     found
 36 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 37 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 42 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 46 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 50 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 51 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 55 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 56 | ERROR | [x] Blank lines are not allowed in class definitions
 61 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 61 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 65 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 65 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 66 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 67 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 67 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 68 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 68 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 69 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 69 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     4
 73 | ERROR | [x] CSS colours must be defined in lowercase; expected
    |       |     #dadfe1 but found #DADFE1
 74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     4
 74 | ERROR | [x] CSS colours must be defined in lowercase; expected
    |       |     #dadfe1 but found #DADFE1
 75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     4
 76 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     4
 77 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     4
 81 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
 82 | ERROR | [x] Spaces must be used to indent lines; tabs are not
    |       |     allowed
 82 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found
    |       |     1
----------------------------------------------------------------------
PHPCBF CAN FIX THE 72 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./dark_responsive.theme
----------------------------------------------------------------------
FOUND 18 ERRORS AND 1 WARNING AFFECTING 17 LINES
----------------------------------------------------------------------
  5 | ERROR   | [x] Doc comment short description must end with a
    |         |     full stop
  9 | WARNING | [x] Unused use statement
  9 | ERROR   | [x] Use statements should be sorted alphabetically.
    |         |     The first wrong one is
    |         |     Drupal\Core\Form\FormStateInterface.
 14 | ERROR   | [x] Expected 1 space(s) before asterisk; 0 found
 15 | ERROR   | [x] Missing function doc comment
 22 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 23 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 24 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 25 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 26 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 27 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 28 | ERROR   | [x] Whitespace found at end of line
 29 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 30 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 31 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
    |         |     found 3
 34 | ERROR   | [x] Missing function doc comment
 37 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 37 | ERROR   | [x] Expected 1 space after closing parenthesis; found
    |         |     0
 50 | ERROR   | [x] Expected 1 space after "="; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 19 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./theme-settings.php
----------------------------------------------------------------------
FOUND 121 ERRORS AND 1 WARNING AFFECTING 74 LINES
----------------------------------------------------------------------
   1 | ERROR   | [x] Missing file doc comment
   3 | WARNING | [x] Unused use statement
   4 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Core\Form\FormStateInterface.
  10 | ERROR   | [x] Missing function doc comment
  11 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  11 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
  12 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  12 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 2
  13 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  13 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 2
  14 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  14 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 2
  15 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  15 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 2
  16 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  18 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  18 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
  19 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  19 | ERROR   | [x] Array indentation error, expected 3 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 3 spaces but
     |         |     found 2
  21 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  21 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 2
  22 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 4
  23 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  26 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  26 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 2
  27 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  27 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 2
  28 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  28 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 2
  29 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  29 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 2
  30 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  30 | ERROR   | [x] Array closing indentation error, expected 2
     |         |     spaces but found 1
  31 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  31 | ERROR   | [x] Whitespace found at end of line
  32 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  32 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
  33 | ERROR   | [x] Array indentation error, expected 3 spaces but
     |         |     found 4
  34 | ERROR   | [x] Array closing indentation error, expected 1
     |         |     spaces but found 2
  35 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  35 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
  36 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
  36 | ERROR   | [x] Expected 1 space after closing parenthesis;
     |         |     found 0
  42 | ERROR   | [x] Expected one space after the comma, 0 found
  47 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  47 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  47 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  48 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  48 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  48 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  49 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  49 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  49 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  50 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  50 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  50 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  51 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  51 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  51 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  52 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  52 | ERROR   | [x] Array indentation error, expected 5 spaces but
     |         |     found 4
  53 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  54 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  54 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  54 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  55 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  55 | ERROR   | [x] Line indented incorrectly; expected at least 4
     |         |     spaces, found 3
  55 | ERROR   | [x] Array indentation error, expected 6 spaces but
     |         |     found 3
  56 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  56 | ERROR   | [x] Array closing indentation error, expected 4
     |         |     spaces but found 2
  70 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  70 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
  77 | ERROR   | [x] Whitespace found at end of line
  78 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  78 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
  79 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  80 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  81 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  82 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  83 | ERROR   | [x] Array closing indentation error, expected 2
     |         |     spaces but found 4
  84 | ERROR   | [x] Whitespace found at end of line
  85 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  85 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
  86 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  87 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  88 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  89 | ERROR   | [x] Array closing indentation error, expected 2
     |         |     spaces but found 4
  90 | ERROR   | [x] Whitespace found at end of line
  91 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  91 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
  92 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  93 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  94 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  95 | ERROR   | [x] Array closing indentation error, expected 2
     |         |     spaces but found 4
  96 | ERROR   | [x] Whitespace found at end of line
  97 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
  97 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
  98 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
  99 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
 100 | ERROR   | [x] Array indentation error, expected 4 spaces but
     |         |     found 6
 101 | ERROR   | [x] Array closing indentation error, expected 2
     |         |     spaces but found 4
 116 | ERROR   | [x] Whitespace found at end of line
 123 | ERROR   | [x] Whitespace found at end of line
 130 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
 130 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
 130 | ERROR   | [x] Closing brace indented incorrectly; expected 2
     |         |     spaces, found 1
 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
 134 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
 134 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
 135 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
 135 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
 136 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
 136 | ERROR   | [x] Line indented incorrectly; expected 4 spaces,
     |         |     found 2
 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
 138 | ERROR   | [x] Spaces must be used to indent lines; tabs are
     |         |     not allowed
 138 | ERROR   | [x] Line indented incorrectly; expected 2 spaces,
     |         |     found 1
----------------------------------------------------------------------
PHPCBF CAN FIX THE 122 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 110ms; Memory: 10MB
📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

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

Not all content is available!

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

  • Issue created by @sonam_sharma
  • sorry! I have uploaded blank patch by mistake, soon I'll provide patch for this issue

  • Assigned to roshni27
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India roshni27

    I have applied patch #4 but its not applied cleanly .I have share screenshot of it.

  • Issue was unassigned.
  • Assigned to nitin_lama
  • 🇮🇳India nitin_lama India

    Fixed most of the phpcs issues. Only remaining warnings are:

    FILE: /home/system/Documents/contribution/dark_responsive/dark_responsive.theme
    -------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -------------------------------------------------------------------------------
     72 | WARNING | Unused variable $video_path.
     75 | WARNING | Unused variable $video_path.
    -------------------------------------------------------------------------------
    
    Time: 28ms; Memory: 6MB
    

    Providing an updated patch. Please review.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇵🇭Philippines paraderojether

    Hi I reviewed patch #9, and there are still remaining issues reported by phpcs shown below:

    FILE: .../studenttrainees/Drupal/drupalorg-issues-site/docroot/themes/contrib/dark_responsive/dark_responsive.theme
    ----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------
     72 | WARNING | Unused variable $video_path.
     75 | WARNING | Unused variable $video_path.
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...s/studenttrainees/Drupal/drupalorg-issues-site/docroot/themes/contrib/dark_responsive/assets/css/style.css
    ----------------------------------------------------------------------------------------------------------------
    FOUND 72 ERRORS AFFECTING 39 LINES
    ----------------------------------------------------------------------------------------------------------------
      1 | ERROR | [x] Whitespace found at end of line
      4 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
      8 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
      8 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     12 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     13 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     14 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     16 | ERROR | [x] Blank lines are not allowed in class definitions
     20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, 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] Line indented incorrectly; expected 2 spaces, found 1
     27 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     31 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     34 | ERROR | [x] Expected 1 space before opening brace of class definition; 0 found
     35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     35 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
     36 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     37 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     37 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     42 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     42 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     46 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     50 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     50 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     51 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     51 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     55 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     56 | ERROR | [x] Blank lines are not allowed in class definitions
     61 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     61 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     65 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     65 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     66 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     66 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     67 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     67 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     68 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     68 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     69 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     69 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     73 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
     73 | ERROR | [x] CSS colours must be defined in lowercase; expected #dadfe1 but found #DADFE1
     74 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
     74 | ERROR | [x] CSS colours must be defined in lowercase; expected #dadfe1 but found #DADFE1
     75 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
     76 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
     77 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
     81 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     81 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     82 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     82 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
    ----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 72 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...rs/studenttrainees/Drupal/drupalorg-issues-site/docroot/themes/contrib/dark_responsive/assets/js/custom.js
    ----------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
     1 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------
    
    Time: 307ms; Memory: 10MB

    Command used: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js dark_responsive

    Please check.
    Thank you.

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India kpoornima

    Fixed most of the phpcs issues. Only 2 remaining warnings are:

    FILE: /var/www/html/web/modules/contrib/dark_responsive-3374671/dark_responsive.theme
    -------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------
     72 | WARNING | Unused variable $video_path.
     75 | WARNING | Unused variable $video_path.
    -------------------------------------------------------------------------------------
    
    Time: 468ms; Memory: 6MB
    

    Please Merge MR3

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India kpoornima

    @apaderno Updated MR3. Please review

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • First commit to issue fork.
  • Status changed to Needs review 11 months ago
  • 🇮🇳India sakthi_dev

    Rebased the branch. Please review.

  • Status changed to Needs work 11 months ago
  • 🇵🇭Philippines paraderojether

    Hi sakthi_dev,

    I reviewed MR!3, applied against Dark Responsive 1.0.x-dev with Drupal core 10.1.7, and there are still remaining issues reported by phpcs shown below:

    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/themes/contrib/dark_responsive/dark_responsive.theme
    ------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 3 LINES
    ------------------------------------------------------------------------------------------------------------------
     37 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
     37 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
     74 | WARNING | [ ] Unused variable $video_path.
     77 | WARNING | [ ] Unused variable $video_path.
    ------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/themes/contrib/dark_responsive/theme-settings.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 30 ERRORS AFFECTING 17 LINES
    ---------------------------------------------------------------------------------------------------------------
     21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     21 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     22 | ERROR | [x] Array indentation error, expected 3 spaces but found 2
     23 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     23 | ERROR | [x] Array indentation error, expected 3 spaces but found 2
     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] Array indentation error, expected 3 spaces but found 4
     26 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     29 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     29 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
     30 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     30 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
     31 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     31 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
     32 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     32 | ERROR | [x] Array indentation error, expected 4 spaces but found 2
     33 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     33 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 1
     34 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     34 | ERROR | [x] Whitespace found at end of line
     35 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     36 | ERROR | [x] Array indentation error, expected 3 spaces but found 4
     37 | ERROR | [x] Array closing indentation error, expected 1 spaces but found 2
     38 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
     38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
     39 | ERROR | [x] Expected 1 space after IF keyword; 0 found
     39 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
    ---------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------

    Command used: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml,twig dark_responsive

    Kindly check and advise, please.
    Thank you.

  • 🇮🇳India zkhan.aamir

    Hi,

    I applied latest MR

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/dark_responsive (1.0.x)
    $ curl https://git.drupalcode.org/project/dark_responsive/-/merge_requests/3.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 14509    0 14509    0     0  38409      0 --:--:-- --:--:-- --:--:-- 38587
    patching file README.md
    patching file assets/css/style.css
    patching file assets/js/custom.js
    patching file dark_responsive.theme
    patching file theme-settings.php
    

    Still two warnings remaining

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib
    $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml dark_responsive/
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\dark_responsive\dark_responsive.theme
    ------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------
     74 | WARNING | Unused variable $video_path.
     77 | WARNING | Unused variable $video_path.
    ------------------------------------------------------------------------------------------------------
    
    Time: 496ms; Memory: 10MB
    
  • 🇮🇳India nitin_lama India

    I'm unclear about the actions performed during the form submission. All I observe is the assignment of values to these variables with a URL, but it seems these variables are not being utilized.

  • Status changed to Needs review 10 months ago
  • 🇮🇳India mohd sahzad

    I have fixed this issue in above attached patch please review that

  • Status changed to Needs work 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
     /**
      * @file
      * Implements theme_preprocess_page().
    -*/
    + */
    +
    +/**
    + * {@inheritdoc}
    + */
     function dark_responsive_preprocess_page(&$variables) {

    A single document comment per function is used. {@inheritdoc} is not used for functions.

    +  // Footer Social Icons Variable.
    +  $variables['show_hide_copyright'] = theme_get_setting('show_hide_copyright');
    +  $variables['copyright_text'] = theme_get_setting('copyright_text');
    

    Since those lines are changed, the comment should be corrected too: those are copyright variables.

  • Status changed to Needs review 10 months ago
  • 🇮🇳India viren18febS

    Hi , i have updated the patch with given comments , please review.
    Thanks

  • Status changed to Needs work 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
     /**
      * @file
    - * Contains theme override functions and preprocess functions
    + * Contains theme override functions and preprocess functions.
      */

    The usual description for .theme files is Functions to support theming in the [theme name] theme. where [theme name] is the name of the theme reported in its .info.yml file.

     /**
      * @file
      * Implements theme_preprocess_page().
    -*/
    + */

    @file is not used for functions.
    The correct description for preprocess hooks in Implements hook_preprocess_HOOK() for [template type] templates. where [template type] is the type of templates to which the preprocess hook is applied (for example, node for node templates).

    +/**
    + * {@inheritdoc}
    + */
     function dark_responsive_get_slider_content() {
    

    {@inheritdoc} is not used for functions.

    +/**
    + * @file
    + * Theme settings for the Dark Responsive theme.
    + */
    +

    The usual description for theme-settings.php files is Functions to support [theme name] theme settings. where [theme name] is the name of the theme reported in its .info.yml file.

    +/**
    + * {@inheritdoc}
    + */
     function dark_responsive_form_system_theme_settings_alter(&$form, FormStateInterface $form_state, $form_id = NULL) {

    {@inheritdoc} is not used for functions.

  • 🇮🇳India pray_12

    Hi,
    Addressed the above comments. Please review.

  • Status changed to Needs review 10 months ago
  • Status changed to Needs work 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I did check all the patch, but the following change must be corrected.

           else {
    -        $video_path = base_path() .'/assets/video/background1.mp4';
    +        base_path() . '/assets/video/background1.mp4';
           }
    

    It does not make sense to concatenate two strings when the result is not used in any way. I do not see any warning/error about unused variables, so that change is not correct and it is not even necessary.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Also, since a MR has been already used, please let us keep using that.

  • Status changed to Needs review 10 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
Production build 0.71.5 2024