Fix the issues reported by phpcs

Created on 2 March 2023, over 1 year ago
Updated 3 March 2023, over 1 year ago

Problem/Motivation

To fix the coding standard issues given by the PHPCS command.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.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
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The 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.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Status changed to Postponed: needs info over 1 year ago
  • 🇺🇸United States kyoder

    The branch comparison shows no changes.

  • 🇮🇳India sidharth_soman Bangalore

    Finding the following issues using phpcs. I'll fix them and issue an MR.

    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 entity_repeat-3345454
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\entity_repeat-3345454\entity_repeat.api.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\entity_repeat-3345454\entity_repeat.module
    ------------------------------------------------------------------------------------------------------
    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: ...backendassignment\web\modules\contrib\entity_repeat-3345454\modules\entity_repeat_group\entity_repeat_group.module
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------------
      1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
     52 | ERROR   | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
     53 | ERROR   | [x] There must be exactly one blank line before the tags in a doc comment
     53 | ERROR   | [ ] Description for the @return value is missing
     72 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\entity_repeat-3345454\src\EntityRepeatPermissions.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------------------------
      1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
     31 | ERROR | [ ] Parameter $bundle_type is not described in comment
     34 | ERROR | [ ] Missing parameter type
    -----------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...cs\backendassignment\web\modules\contrib\entity_repeat-3345454\src\EventSubscriber\EntityRepeatEventSubscriber.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: ...cs\backendassignment\web\modules\contrib\entity_repeat-3345454\src\Plugin\Field\FieldWidget\EntityRepeatWidget.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ------------------------------------------------------------------------------------------------------------------------
       1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
      43 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
      58 | ERROR   | [ ] Missing parameter comment
      58 | ERROR   | [x] Data types in @param tags need to be fully namespaced
      59 | ERROR   | [x] Separate the @param and @return sections by a blank line.
      59 | ERROR   | [ ] Description for the @return value is missing
     111 | WARNING | [ ] Line exceeds 80 characters; contains 116 characters
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...p\htdocs\backendassignment\web\modules\contrib\entity_repeat-3345454\tests\src\Functional\EntityRepeatTestBase.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: 6.12 secs; Memory: 6MB
    
  • @sidharth_soman opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    All issues except for documentation errors (doc comments for parameters/return types are required) have been resolved. I've issued the above MR. Please review.

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

    The Needs work status is for the issue summary that has not yet updated. To fix the coding standard issues given by the PHPCS command. is not sufficient as issue summary.

  • 🇺🇸United States kyoder

    Thank you for the MR but it looks like it's missing the carriage return fixes?

  • Status changed to Fixed over 1 year ago
  • Status changed to Fixed over 1 year ago
Production build 0.69.0 2024