Fix the issues reported by phpcs

Created on 12 May 2023, over 1 year ago
Updated 13 June 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\config_distro.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\config_distro\config_distro.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: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_filter\src\ConfigDistroFilterEventSubscriber.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
14 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
15 | ERROR | [x] Expected 1 space before opening brace; found 0
39 | ERROR | [ ] Missing parameter comment
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_ignore\config_distro_ignore.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: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_ignore\src\Controller\ConfigDistroIgnoreController.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"
5 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_ignore\src\Form\AddIgnoredConfigForm.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
17 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
98 | WARNING | [x] A comma should follow the last multiline array item. Found: )
183 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_ignore\src\Form\SettingsForm.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"
119 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\modules\config_distro_ignore\src\Plugin\ConfigFilter\DistroIgnoreFilter.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
138 | WARNING | [ ] The use of function fnmatch() is discouraged
158 | WARNING | [ ] The use of function fnmatch() is discouraged
-----------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\src\Commands\ConfigDistroCommands.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"
108 | WARNING | [x] '@TODO: make this work again after drush is fixed...' should match the format '@todo Fix problem X here.'
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\src\ConfigDistroConfigImporterBatch.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\config_distro\src\Controller\ConfigDistroController.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\config_distro\src\DistroStorageManager.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"
13 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\src\Event\ConfigDistroEvents.php
----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
27 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
36 | ERROR | [x] The closing brace for the class must have an empty line before it
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\src\Event\DistroStorageTransformEvent.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\config_distro\src\Form\ConfigDistroImportForm.php
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
26 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
44 | WARNING | [x] '@todo: why is this empty?' should match the format '@todo Fix problem X here.'
59 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\src\Plugin\ConfigDistroFilterBase.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\config_distro\src\Plugin\ConfigDistroFilterInterface.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\config_distro\tests\modules\config_distro_test\config_distro_test.info.yml
--------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | "Description" property is missing in the info.yml file
--------------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\config_distro\tests\modules\config_distro_test\src\Plugin\ConfigFilter\PirateFilter.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: 3.78 secs; Memory: 6MB

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

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

Comments & Activities

  • Issue created by @sidharth_soman
  • Assigned to sidharth_soman
  • 🇮🇳India sidharth_soman Bangalore

    Working on this

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

    Reviewing this.

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

    Hi I reviewed the MR. running phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml . Still returns the following errors. Need to fix.

    FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/config_distro/src/Event/ConfigDistroEvents.php
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------
     27 | WARNING | Line exceeds 80 characters; contains 83 characters
    -----------------------------------------------------------------------------------------------------
    
    
    FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/config_distro/src/Form/ConfigDistroImportForm.php
    --------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     26 | WARNING | Line exceeds 80 characters; contains 83 characters
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/config_distro/modules/config_distro_ignore/src/Form/AddIgnoredConfigForm.php
    -----------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------
     18 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    -----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/config_distro/modules/config_distro_ignore/src/Plugin/ConfigFilter/DistroIgnoreFilter.php
    ------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------------
     138 | WARNING | The use of function fnmatch() is discouraged
     158 | WARNING | The use of function fnmatch() is discouraged
    ------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/arpitkayare/drupal_9.5/web/modules/contrib/config_distro/modules/config_distro_filter/src/ConfigDistroFilterEventSubscriber.php
    -------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------
     14 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
     39 | ERROR   | Missing parameter comment
    -------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 2.22 secs; Memory: 10MB
    
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India arpitk

    I have fixed the remaining errors reported here and updated MR. Please review.

    Thanks!

  • 🇺🇸United States joegraduate Arizona, USA
  • 🇺🇸United States joegraduate Arizona, USA
  • Assigned to arpitk
  • 🇮🇳India arpitk

    Updating the MR.

    Thanks!

  • Issue was unassigned.
  • 🇮🇳India arpitk

    Updated the PR Please review.

    Thanks!

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States joegraduate Arizona, USA

    Looks good to me after all the latest changes (plus some additional changes I made). Will plan to merge this soon and include in a release. Thanks all!

  • 🇺🇸United States joegraduate Arizona, USA
  • Status changed to Fixed over 1 year ago
  • 🇺🇸United States joegraduate Arizona, USA

    Merged.

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

Production build 0.71.5 2024