Coding Standard Errors

Created on 16 February 2023, over 1 year ago

Problem/Motivation

Getting the following warnings.

FILE: /var/www/html/web/modules/custom/download_all_files/download_all_files.module
-------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------
 20 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
 20 | ERROR | [x] Concat operator must be surrounded by a single space
 25 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
 26 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------


FILE: /var/www/html/web/modules/custom/download_all_files/src/Controller/DownloadController.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 19 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------

Time: 14.27 secs; Memory: 42.51MB

Steps to reproduce

Run following command

phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml download_all_files

Proposed resolution

The above warnings need to be fixed.

Remaining tasks

Nil

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

2.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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. I will work on solving 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 download_all_files-3342296
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\download_all_files-3342296\css\download_all_files.css
    -----------------------------------------------------------------------------------------------------------------
    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\download_all_files-3342296\download_all_files.module
    ----------------------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 4 LINES
    ----------------------------------------------------------------------------------------------------------------
      1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
     20 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
     20 | ERROR | [x] Concat operator must be surrounded by a single space
     25 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
     26 | ERROR | [x] Case breaking statement indented incorrectly; expected 6 spaces, found 4
    ----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\download_all_files-3342296\src\Controller\DownloadController.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------
      1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
     19 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\download_all_files-3342296\src\Plugin\Archiver\Zip.php
    ------------------------------------------------------------------------------------------------------------------
    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\download_all_files-3342296\src\Plugin\Field\FieldFormatter\DownloadAllFormatter.php
    -----------------------------------------------------------------------------------------------------------------------------------------------
    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
    -----------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 720ms; Memory: 6MB
    

    Moving to 'Needs Work'.

  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    All errors resolved. Please review the MR created above.

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

    Issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.

  • 🇮🇳India arunkumark Coimbatore

    Issue summary update

  • Status changed to RTBC over 1 year ago
  • 🇮🇳India arunkumark Coimbatore

    Reviewed the MR , which applies cleanly and all the coding standard issues got resolved.

    Moving to RTBC.

Production build 0.69.0 2024