Fix the issues reported by phpcs

Created on 15 February 2023, over 1 year ago
Updated 17 February 2023, over 1 year ago

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig returns the following report. Those issues should be fixed.

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\css\views-semantic-tabs.css
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] Expected 1 newline at end of file; 0 found

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\README.md
-------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------
 14 | WARNING | Line exceeds 80 characters; contains 83 characters

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\src\Plugin\views\style\ViewsSemanticTabs.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 49 | WARNING | [x] A comma should follow the last multiline array item. Found: )
 77 | ERROR   | [x] Doc comment short description must end with a full stop
 84 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
 87 | ERROR   | [x] Expected 1 blank line after function; 0 found
 88 | ERROR   | [x] The closing brace for the class must have an empty line before it

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.install
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
 1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.module
------------------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 5 WARNINGS AFFECTING 12 LINES
------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
 37 | ERROR   | [ ] Type hint "array" missing for $variables
 66 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
 67 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 72 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 75 | WARNING | [x] A comma should follow the last multiline array item. Found: 'views-semantic-tabs'
 80 | WARNING | [x] 'todo : hide group field from row content' should match the format '@todo Fix problem X here.'
 80 | ERROR   | [x] Inline comments must start with a capital letter
 83 | ERROR   | [ ] Comment indentation error, expected only 1 spaces
 85 | ERROR   | [ ] Comment indentation error, expected only 2 spaces
 86 | WARNING | [x] There must be no blank line following an inline comment
 86 | WARNING | [ ] There must be no blank line following an inline comment
 86 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 88 | WARNING | [x] 'todo : group field value should be plain text' should match the format '@todo Fix problem X here.'
 88 | ERROR   | [x] Inline comments must start with a capital letter
 88 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 98 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
📌 Task
Status

Needs review

Version

3.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Comments & Activities

  • Issue created by @sidharth_soman
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    Finding the following issues using php codesniffer. I will work on them.

    C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig views_semantic_tabs-3341851
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\css\views-semantic-tabs.css
    -------------------------------------------------------------------------------------------------------------------
    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
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\README.md
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------
     14 | WARNING | Line exceeds 80 characters; contains 83 characters
    -------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\src\Plugin\views\style\ViewsSemanticTabs.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    ------------------------------------------------------------------------------------------------------------------------------------
      1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
     49 | WARNING | [x] A comma should follow the last multiline array item. Found: )
     77 | ERROR   | [x] Doc comment short description must end with a full stop
     84 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
     87 | ERROR   | [x] Expected 1 blank line after function; 0 found
     88 | ERROR   | [x] The closing brace for the class must have an empty line before it
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.install
    -------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------
     1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
    -------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\views_semantic_tabs-3341851\views_semantic_tabs.module
    ------------------------------------------------------------------------------------------------------------------------------
    FOUND 12 ERRORS AND 5 WARNINGS AFFECTING 12 LINES
    ------------------------------------------------------------------------------------------------------------------------------
      1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
     37 | ERROR   | [ ] Type hint "array" missing for $variables
     66 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
     67 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     72 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     75 | WARNING | [x] A comma should follow the last multiline array item. Found: 'views-semantic-tabs'
     80 | WARNING | [x] 'todo : hide group field from row content' should match the format '@todo Fix problem X here.'
     80 | ERROR   | [x] Inline comments must start with a capital letter
     83 | ERROR   | [ ] Comment indentation error, expected only 1 spaces
     85 | ERROR   | [ ] Comment indentation error, expected only 2 spaces
     86 | WARNING | [x] There must be no blank line following an inline comment
     86 | WARNING | [ ] There must be no blank line following an inline comment
     86 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     88 | WARNING | [x] 'todo : group field value should be plain text' should match the format '@todo Fix problem X here.'
     88 | ERROR   | [x] Inline comments must start with a capital letter
     88 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     98 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
    ------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------
    
    Time: 557ms; Memory: 6MB
    
  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    I have solved all the above issues and made an MR for the same. Please review.

  • Assigned to annmarysruthy
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Issue was unassigned.
  • First commit to issue fork.
  • 🇧🇷Brazil mabho Rio de Janeiro, RJ

    @sidharth_soman, I have tested your changes and they seem to be working all right. Thank you for taking the time to apply the code standard changes.

    Do you mind reviewing and applying changes (the same way you did here) to the 4.0.x branch, since that is the latest dev version?

    Thank you so much in advance.

Production build 0.69.0 2024