Fix the issues reported by phpcs

Created on 24 March 2023, over 1 year ago
Updated 11 August 2024, 3 months ago

Problem/Motivation

FILE: /config_ignore_keys/src/EventSubscriber/ConfigImportEventSubscriber.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: /config_ignore_keys/src/Plugin/Manager/ConfigurationIgnorePluginManager.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------
 13 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
------------------------------------------------------------------------------------------------------------------------------


FILE: /config_ignore_keys/src/Plugin/ConfigurationIgnorePluginInterface.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
 9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
------------------------------------------------------------------------------------------------------------------------


FILE: /config_ignore_keys/tests/src/Kernel/ConfigIgnoreTest.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 15 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
---------------------------------------------------------------------------------------------------------------

Steps to reproduce

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

Proposed resolution

Fix the warnings.

šŸ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India Binoli Lalani Gujarat

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

Comments & Activities

  • Issue created by @Binoli Lalani
  • @binoli-lalani opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India Binoli Lalani Gujarat

    Hello,

    I fixed phpcs warnings. Please review MR.

    Thank you!

  • šŸ‡®šŸ‡³India nayana_mvr

    Verified the MR!1. The patch applied cleanly and all the coding standard issues are fixed now. Need RTBC+1.

  • Status changed to Needs work 3 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied MR !1 but there are many PHPCS issues in the module.

    āžœ  config_ignore_keys git:(8.x-1.x) curl https://git.drupalcode.org/project/config_ignore_keys/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2285    0  2285    0     0   4517      0 --:--:-- --:--:-- --:--:--  4663
    patching file 'src/EventSubscriber/ConfigImportEventSubscriber.php'
    patching file 'src/Plugin/ConfigurationIgnorePluginInterface.php'
    patching file 'src/Plugin/Manager/ConfigurationIgnorePluginManager.php'
    patching file 'tests/src/Kernel/ConfigIgnoreTest.php'
    āžœ  config_ignore_keys git:(8.x-1.x) āœ— ..
    āžœ  drupal_local git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_ignore_keys   
    
    FILE: .../Projects/d10/drupal_local/config_ignore_keys/tests/modules/configuration_ignore_test/src/Plugin/ConfigIgnore/NodeConfigIgnore.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
       |       |     Drupal\config_ignore_keys\Plugin\ConfigurationIgnorePluginInterface.
    ----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/config_ignore_keys/config_ignore_keys.info.yml
    --------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/config_ignore_keys/src/Plugin/ConfigIgnore/NullConfigIgnorePlugin.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
       |       |     Drupal\config_ignore_keys\Plugin\ConfigurationIgnorePluginInterface.
    ----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/config_ignore_keys/src/Plugin/Manager/ConfigurationIgnorePluginManager.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
     6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/config_ignore_keys/src/EventSubscriber/ConfigImportEventSubscriber.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 6 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
     10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
        |       |     Drupal\config_ignore_keys\Plugin\Manager\ConfigurationIgnorePluginManager.
     79 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     80 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     81 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     82 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     83 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
     83 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     83 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    ----------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 420ms; Memory: 10MB
    
    āžœ  drupal_local git:(main) āœ— 
    
Production build 0.71.5 2024