Coding Standard Issues

Created on 15 February 2023, almost 2 years ago
Updated 21 July 2024, 6 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

9.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Merge Requests

Comments & Activities

  • Issue created by @sidharth_soman
  • Status changed to Needs work almost 2 years ago
  • 🇮🇳India sidharth_soman Bangalore

    Finding the following issues using php codesniffer. I will provide a patch for 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 user_default_page-3341803
    
    FILE: ...\htdocs\backendassignment\web\modules\contrib\user_default_page-3341803\src\Entity\UserDefaultPageConfigEntity.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: ...backendassignment\web\modules\contrib\user_default_page-3341803\src\Form\UserDefaultPageConfigEntityDeleteForm.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: ...tdocs\backendassignment\web\modules\contrib\user_default_page-3341803\src\Form\UserDefaultPageConfigEntityForm.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"
     18 | 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: ...ckendassignment\web\modules\contrib\user_default_page-3341803\src\UserDefaultPageConfigEntityHtmlRouteProvider.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: ...tdocs\backendassignment\web\modules\contrib\user_default_page-3341803\src\UserDefaultPageConfigEntityInterface.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: ...ocs\backendassignment\web\modules\contrib\user_default_page-3341803\src\UserDefaultPageConfigEntityListBuilder.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\user_default_page-3341803\user_default_page.module
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
    ------------------------------------------------------------------------------------------------------------------------
       1 | ERROR   | [x] End of line character is invalid; expected "\n" but found "\r\n"
       5 | ERROR   | [x] Function comment short description must start with exactly one space
      24 | ERROR   | [ ] The array declaration extends to column 306 (the limit is 80). The array content should be split
         |         |     up over multiple lines
     110 | WARNING | [ ] Only string literals should be passed to t() where possible
     159 | WARNING | [ ] Only string literals should be passed to t() where possible
     224 | WARNING | [x] 'TODO: Conditionally display message based on user permissions.' should match the format '@todo
         |         |     Fix problem X here.'
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------
    
    Time: 4.54 secs; Memory: 6MB
    
  • Merge request !2Issue #3341803: Coding Standard Issues → (Merged) created by sidharth_soman
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India sidharth_soman Bangalore

    I have solved all the coding standard issues and opened an MR for the same. Please review.

  • Issue was unassigned.
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    VladimirAus changed the visibility of the branch 9.0.x to hidden.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    PHPCS is all good.

  • Status changed to RTBC 7 months ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia
  • Status changed to Fixed 7 months ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Committed! Thank you! 🍰

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024