Fix remaining phpcs issues

Created on 4 May 2023, over 1 year ago
Updated 18 July 2024, 4 months ago

Problem/Motivation

We already fixed a bunch of phpcs issues through šŸ“Œ Fix phpcs issues through phpcbf. Fixed , but there are still issues left, which we can not fix automatically, and which will take a bit longer, as some of them are connected to this module's structural issues (e.g. passing variables to "t()")

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig prod_check/

Proposed resolution

Fix the remaining phpcs issues (Fixing them in 2.x only should be enough).

Remaining tasks

FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/modules/prod_check_rest/src/Plugin/rest/resource/ProdCheckModulesResource.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 25 | WARNING | Line exceeds 80 characters; contains 82 characters
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/modules/prod_check_xmlrpc/prod_check_xmlrpc.module
----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------
 31 | WARNING | Line exceeds 80 characters; contains 100 characters
----------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/prod_check.module
-------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
-------------------------------------------------------------------------
  44 | WARNING | Line exceeds 80 characters; contains 81 characters
 114 | WARNING | Line exceeds 80 characters; contains 117 characters
 115 | WARNING | Line exceeds 80 characters; contains 118 characters
 148 | WARNING | Line exceeds 80 characters; contains 117 characters
 149 | WARNING | Line exceeds 80 characters; contains 118 characters
-------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/ProcessorPluginCollection.php
-----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
 23 | WARNING | Possible useless method overriding detected
-----------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckProcessor/ConfigurableProdCheckProcessorBase.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
 12 | WARNING | Line exceeds 80 characters; contains 87 characters
----------------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Modules/ModuleList.php
---------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
 39 | WARNING | Line exceeds 80 characters; contains 85 characters
---------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/ProdCheckBase.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------
 165 | WARNING | Only string literals should be passed to t() where possible
 201 | WARNING | Code after the RETURN statement on line 199 cannot be executed
 205 | WARNING | Code after the RETURN statement on line 203 cannot be executed
 208 | WARNING | Code after the RETURN statement on line 207 cannot be executed
----------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Entity/ProdCheckProcessorConfigInterface.php
--------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------
 24 | WARNING | Line exceeds 80 characters; contains 82 characters
--------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/ProdCheck.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------
 12 | WARNING | Line exceeds 80 characters; contains 89 characters
 14 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
--------------------------------------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/CheckPluginCollection.php
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
 23 | WARNING | Possible useless method overriding detected
-------------------------------------------------------------------------------------


FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Form/SettingsForm.php
---------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------
 21 | WARNING | Possible useless method overriding detected
---------------------------------------------------------------------------------

Time: 343ms; Memory: 12MB
šŸ“Œ Task
Status

RTBC

Version

2.0

Component

Code

Created by

šŸ‡©šŸ‡ŖGermany Grevil

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

Merge Requests

Comments & Activities

  • Issue created by @Grevil
  • First commit to issue fork.
  • Status changed to Needs work over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

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

  • Open on Drupal.org ā†’
    Core: 9.5.5 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
  • @dineshkumarbollu opened merge request.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India dineshkumarbollu

    Hi

    I fixed most of the issue except some.

  • Status changed to Needs work over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    The status is for the issue summary that still needs to be updated.

  • šŸ‡©šŸ‡ŖGermany Grevil

    @dineshkumarbollu please only fix the remaining phpcs issues inside 2.x.

  • Status changed to Needs review over 1 year ago
  • Open on Drupal.org ā†’
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    Waiting for branch to pass
  • šŸ‡®šŸ‡³India roshni27
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/modules/prod_check_rest/src/Plugin/rest/resource/ProdCheckModulesResource.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------
     21 | ERROR | Missing short description in doc comment
     22 | ERROR | Description for the @return value is missing
    -------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/modules/prod_check_xmlrpc/src/Plugin/ProdCheckProcessor/XmlRpc.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
     98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/modules/prod_check_xmlrpc/prod_check_xmlrpc.module
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 6 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------
     11 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
        |         | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
        |         | hook_foo_BAR_ID_bar() for block templates."
     32 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
     49 | ERROR   | Missing parameter name
     51 | ERROR   | Missing parameter name
     54 | ERROR   | Return type missing for @return tag in function comment
     55 | WARNING | Line exceeds 80 characters; contains 87 characters
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/prod_check.module
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 6 WARNINGS AFFECTING 7 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------
      33 | ERROR   | Missing parameter type
      44 | WARNING | Line exceeds 80 characters; contains 81 characters
      89 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements
         |         | hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
         |         | hook_foo_BAR_ID_bar() for block templates."
     114 | WARNING | Line exceeds 80 characters; contains 117 characters
     115 | WARNING | Line exceeds 80 characters; contains 118 characters
     148 | WARNING | Line exceeds 80 characters; contains 117 characters
     149 | WARNING | Line exceeds 80 characters; contains 118 characters
    ----------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/ProcessorPluginCollection.php
    -----------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------
     15 | ERROR   | Description for the @return value is missing
     17 | WARNING | Possible useless method overriding detected
    -----------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckProcessor/ConfigurableProdCheckProcessorBase.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------
     12 | WARNING | Line exceeds 80 characters; contains 87 characters
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckProcessor/ProdCheckProcessorBase.php
    ----------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------
     33 | ERROR | Parameter $manager is not described in comment
     33 | ERROR | Parameter $category_manager is not described in comment
    ----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckProcessor/Internal.php
    --------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------
     41 | ERROR | Missing parameter comment
    --------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckProcessorInterface.php
    --------------------------------------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 5 LINES
    --------------------------------------------------------------------------------------------------
     13 | ERROR | Missing parameter comment
     20 | ERROR | Return type missing for @return tag in function comment
     28 | ERROR | Return type missing for @return tag in function comment
     36 | ERROR | Return type missing for @return tag in function comment
     44 | ERROR | Return type missing for @return tag in function comment
    --------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheckInterface.php
    -----------------------------------------------------------------------------------------
    FOUND 7 ERRORS AFFECTING 7 LINES
    -----------------------------------------------------------------------------------------
     18 | ERROR | Return type missing for @return tag in function comment
     26 | ERROR | Return type missing for @return tag in function comment
     34 | ERROR | Return type missing for @return tag in function comment
     42 | ERROR | Return type missing for @return tag in function comment
     51 | ERROR | Return type missing for @return tag in function comment
     59 | ERROR | Return type missing for @return tag in function comment
     69 | ERROR | Return type missing for @return tag in function comment
    -----------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Modules/ModulesBase.php
    ----------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------
     14 | ERROR | Missing @var tag in member variable comment
     19 | ERROR | Missing @var tag in member variable comment
    ----------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Modules/Contact.php
    ------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------
     22 | ERROR | Missing @var tag in member variable comment
    ------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Modules/ModuleList.php
    -------------------------------------------------------------------------------------------------------------------
    FOUND 16 ERRORS AFFECTING 16 LINES
    -------------------------------------------------------------------------------------------------------------------
      24 | ERROR | Missing short description in doc comment
      38 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
      47 | ERROR | Missing parameter comment
      48 | ERROR | Missing parameter comment
      49 | ERROR | Missing parameter comment
      50 | ERROR | Missing parameter comment
      51 | ERROR | Missing parameter comment
      52 | ERROR | Missing parameter comment
      53 | ERROR | Missing parameter comment
      54 | ERROR | Missing parameter comment
      73 | ERROR | Missing short description in doc comment
      74 | ERROR | Missing parameter comment
      75 | ERROR | Missing parameter comment
      76 | ERROR | Missing parameter comment
      77 | ERROR | Missing parameter comment
     127 | ERROR | Doc comment is empty
    -------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Server/ReleaseNotes.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------
     21 | ERROR   | Missing @var tag in member variable comment
     22 | ERROR   | Class property $remaining_files should use lowerCamel naming without underscores
     96 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Server/DbLog.php
    ---------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------
     21 | ERROR | Missing @var tag in member variable comment
     27 | ERROR | Missing @var tag in member variable comment
     33 | ERROR | Missing @var tag in member variable comment
    ---------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Settings/UserRegister.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      22 | ERROR   | Missing @var tag in member variable comment
      27 | ERROR   | Missing @var tag in member variable comment
      77 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     104 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Settings/PoormansCron.php
    ------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------
     20 | ERROR | Missing @var tag in member variable comment
    ------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Settings/SiteMail.php
    --------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------
     20 | ERROR | Missing @var tag in member variable comment
     21 | ERROR | Class property $dangerous_mail should use lowerCamel naming without underscores
    --------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Settings/ErrorReporting.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      21 | ERROR   | Missing @var tag in member variable comment
      26 | ERROR   | Missing @var tag in member variable comment
      79 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     107 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Plugin/ProdCheck/ProdCheckBase.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
     165 | WARNING | Only string literals should be passed to t() where possible
     201 | WARNING | Code after the RETURN statement on line 199 cannot be executed
     205 | WARNING | Code after the RETURN statement on line 203 cannot be executed
     208 | WARNING | Code after the RETURN statement on line 207 cannot be executed
     233 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Entity/ProdCheckProcessorConfigInterface.php
    --------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    --------------------------------------------------------------------------------------------------------
     15 | ERROR | Description for the @return value is missing
     22 | ERROR | Description for the @return value is missing
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Entity/ProdCheckConfigInterface.php
    -----------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------
     15 | ERROR | Description for the @return value is missing
     22 | ERROR | Description for the @return value is missing
    -----------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/ProdCheck.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     14 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/ProcessorListBuilder.php
    -----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------------
       6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\Entity\ConfigEntityListBuilder.
      19 | ERROR   | [ ] Missing short description in doc comment
      88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     104 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     113 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/CheckPluginCollection.php
    -------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    -------------------------------------------------------------------------------------
     15 | ERROR   | Description for the @return value is missing
     17 | WARNING | Possible useless method overriding detected
    -------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/Form/SettingsForm.php
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------
      6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\ConfigFactory.
     21 | WARNING | [ ] Possible useless method overriding detected
     55 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ---------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/src/CheckListBuilder.php
    -----------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
    -----------------------------------------------------------------------------------------------------------------------------------------------
       6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Config\Entity\ConfigEntityListBuilder.
      19 | ERROR   | [ ] Missing short description in doc comment
      88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     104 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     113 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    -----------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/lenovo/d7to9/web/modules/contrib/prod_check/templates/prod-check-status-report.html.twig
    ----------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------
     56 | ERROR | [x] Expected 1 newline at end of file; 0 found
    ----------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------
    
    Time: 355ms; Memory: 12MB

    Some issues which are better know to maintainer are pending, for reading purpose character limits issues remain and all remaining issues solve by me. Please review the patch.

  • Status changed to Needs work over 1 year ago
  • šŸ‡©šŸ‡ŖGermany Grevil

    Thanks, @roshni27! Could you apply the patch as an MR for easier reviewability?

  • šŸ‡®šŸ‡³India imustakim Ahmedabad

    Issue summary updated.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Assigned to nitin_lama
  • Merge request !9#3358142 Addressing comment #9. ā†’ (Open) created by nitin_lama
  • Open on Drupal.org ā†’
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    Waiting for branch to pass
  • Open on Drupal.org ā†’
    Core: 10.0.7 + Environment: PHP 8.2 & MySQL 8
    last update over 1 year ago
    Waiting for branch to pass
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • First commit to issue fork.
  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • šŸ‡®šŸ‡³India Shank115

    I ran phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml command and found the following errors:

    FILE: /home/sites/prod_check/src/Form/SettingsForm.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     21 | WARNING | Possible useless method overriding detected
    ----------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/CheckPluginCollection.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     23 | WARNING | Possible useless method overriding detected
    ----------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/ProdCheck.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     14 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/ProcessorPluginCollection.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     23 | WARNING | Possible useless method overriding detected
    ----------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/Entity/ProdCheckProcessorConfigInterface.php
    -----------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------
     24 | WARNING | Line exceeds 80 characters; contains 82 characters
    -----------------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/Plugin/ProdCheck/ProdCheckBase.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------------
     165 | WARNING | Only string literals should be passed to t() where possible
     201 | WARNING | Code after the RETURN statement on line 199 cannot be executed
     205 | WARNING | Code after the RETURN statement on line 203 cannot be executed
     208 | WARNING | Code after the RETURN statement on line 207 cannot be executed
    --------------------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/Plugin/ProdCheck/Modules/ModuleList.php
    ------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------
     39 | WARNING | Line exceeds 80 characters; contains 85 characters
    ------------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/src/Plugin/ProdCheckProcessor/ConfigurableProdCheckProcessorBase.php
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------
     12 | WARNING | Line exceeds 80 characters; contains 87 characters
    -------------------------------------------------------------------------------------------------
    
    
    FILE: /home/sites/prod_check/prod_check.module
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    ----------------------------------------------------------------------
      44 | WARNING | Line exceeds 80 characters; contains 81 characters
     114 | WARNING | Line exceeds 80 characters; contains 117 characters
     115 | WARNING | Line exceeds 80 characters; contains 118 characters
     148 | WARNING | Line exceeds 80 characters; contains 117 characters
     149 | WARNING | Line exceeds 80 characters; contains 118 characters
    ----------------------------------------------------------------------
    
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    apaderno ā†’ changed the visibility of the branch 3358142-fix-remaining-phpcs to hidden.

  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • Pipeline finished with Success
    8 months ago
    Total: 139s
    #123388
  • First commit to issue fork.
  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • Pipeline finished with Success
    8 months ago
    Total: 139s
    #124770
  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.2 & MySQL 8
    last update 8 months ago
    Waiting for branch to pass
  • Pipeline finished with Success
    8 months ago
    Total: 171s
    #124875
  • Status changed to Needs work 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi,

    I applied MR!9 and these are the remaining issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml.

    āžœ  prod_check git:(2.x) curl https://git.drupalcode.org/project/prod_check/-/merge_requests/9.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 38052    0 38052    0     0    97k      0 --:--:-- --:--:-- --:--:--   98k
    patching file .gitlab-ci.yml
    patching file modules/prod_check_rest/src/Plugin/rest/resource/ProdCheckModulesResource.php
    patching file modules/prod_check_xmlrpc/prod_check_xmlrpc.module
    patching file modules/prod_check_xmlrpc/src/Plugin/ProdCheckProcessor/XmlRpc.php
    patching file prod_check.module
    patching file src/CheckListBuilder.php
    patching file src/CheckPluginCollection.php
    patching file src/Entity/ProdCheckConfigInterface.php
    patching file src/Entity/ProdCheckProcessor.php
    patching file src/Entity/ProdCheckProcessorConfigInterface.php
    patching file src/Form/SettingsForm.php
    patching file src/Plugin/ProdCheck/Modules/Contact.php
    patching file src/Plugin/ProdCheck/Modules/ModuleList.php
    patching file src/Plugin/ProdCheck/Modules/ModulesBase.php
    patching file src/Plugin/ProdCheck/ProdCheckBase.php
    patching file src/Plugin/ProdCheck/Server/DbLog.php
    patching file src/Plugin/ProdCheck/Server/ReleaseNotes.php
    patching file src/Plugin/ProdCheck/Settings/ErrorReporting.php
    patching file src/Plugin/ProdCheck/Settings/PoormansCron.php
    patching file src/Plugin/ProdCheck/Settings/SiteMail.php
    patching file src/Plugin/ProdCheck/Settings/UserRegister.php
    patching file src/Plugin/ProdCheckInterface.php
    patching file src/Plugin/ProdCheckProcessor/ConfigurableProdCheckProcessorBase.php
    patching file src/Plugin/ProdCheckProcessor/Internal.php
    patching file src/Plugin/ProdCheckProcessor/ProdCheckProcessorBase.php
    patching file src/Plugin/ProdCheckProcessorInterface.php
    patching file src/ProcessorListBuilder.php
    patching file src/ProcessorPluginCollection.php
    patching file src/ProdCheck.php
    patching file templates/prod-check-status-report.html.twig
    āžœ  prod_check git:(2.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml prod_check
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/prod_check.module
    -------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    -------------------------------------------------------------------------------------------------
      44 | WARNING | Line exceeds 80 characters; contains 81 characters
     114 | WARNING | Line exceeds 80 characters; contains 117 characters
     115 | WARNING | Line exceeds 80 characters; contains 118 characters
     148 | WARNING | Line exceeds 80 characters; contains 117 characters
     149 | WARNING | Line exceeds 80 characters; contains 118 characters
    -------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/src/Form/SettingsForm.php
    ---------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------
     21 | WARNING | Possible useless method overriding detected
    ---------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/src/CheckPluginCollection.php
    -------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------
     23 | WARNING | Possible useless method overriding detected
    -------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/src/Plugin/ProdCheck/ProdCheckBase.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 10 ERRORS AND 4 WARNINGS AFFECTING 12 LINES
    ----------------------------------------------------------------------------------------------------------------------------
      88 | ERROR   | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
      89 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      90 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      91 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      92 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
      93 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      94 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      95 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
      95 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
      95 | ERROR   | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     165 | WARNING | [ ] Only string literals should be passed to t() where possible
     201 | WARNING | [ ] Code after the RETURN statement on line 199 cannot be executed
     205 | WARNING | [ ] Code after the RETURN statement on line 203 cannot be executed
     208 | WARNING | [ ] Code after the RETURN statement on line 207 cannot be executed
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/src/Plugin/ProdCheck/Modules/ModuleList.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------------------------------------
     46 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
     73 | ERROR   | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
     73 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
     89 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ---------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/prod_check/src/ProcessorPluginCollection.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     23 | WARNING | Possible useless method overriding detected
    -----------------------------------------------------------------------------------------------------------------
    
    Time: 718ms; Memory: 10MB
    
    āžœ  contrib git:(main) āœ—

    Thank you.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    The list of the PHP_CodeSniffer errors/warnings that still needs to be fixed are shown in the GitLab CI pipeline output. There is no need to copy in a comment what reported there.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹

    There are merge conflicts that need to be manually resolved. Alternatively, a new issue fork is created to start from scratch.

  • Pipeline finished with Success
    4 months ago
    Total: 127s
    #221000
  • Assigned to apaderno
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Pipeline finished with Success
    4 months ago
    Total: 149s
    #221048
  • Pipeline finished with Success
    4 months ago
    Total: 135s
    #221066
  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @apaderno,

    I applied MR!9, it was applied smoothly and fixed all the phpcs issues.

    āžœ  prod_check git:(2.x) curl https://git.drupalcode.org/project/prod_check/-/merge_requests/9.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 44216    0 44216    0     0  93226      0 --:--:-- --:--:-- --:--:-- 93479
    patching file .gitlab-ci.yml
    patching file modules/prod_check_rest/src/Plugin/rest/resource/ProdCheckModulesResource.php
    patching file modules/prod_check_xmlrpc/prod_check_xmlrpc.module
    patching file modules/prod_check_xmlrpc/src/Plugin/ProdCheckProcessor/XmlRpc.php
    patching file prod_check.module
    patching file src/CheckListBuilder.php
    patching file src/CheckPluginCollection.php
    patching file src/Entity/ProdCheckConfigInterface.php
    patching file src/Entity/ProdCheckProcessor.php
    patching file src/Entity/ProdCheckProcessorConfigInterface.php
    patching file src/Form/SettingsForm.php
    patching file src/Plugin/ProdCheck/Modules/Contact.php
    patching file src/Plugin/ProdCheck/Modules/ModuleList.php
    patching file src/Plugin/ProdCheck/Modules/ModulesBase.php
    patching file src/Plugin/ProdCheck/ProdCheckBase.php
    patching file src/Plugin/ProdCheck/Server/DbLog.php
    patching file src/Plugin/ProdCheck/Server/ReleaseNotes.php
    patching file src/Plugin/ProdCheck/Settings/ErrorReporting.php
    patching file src/Plugin/ProdCheck/Settings/PoormansCron.php
    patching file src/Plugin/ProdCheck/Settings/SiteMail.php
    patching file src/Plugin/ProdCheck/Settings/UserRegister.php
    patching file src/Plugin/ProdCheckInterface.php
    patching file src/Plugin/ProdCheckProcessor/ConfigurableProdCheckProcessorBase.php
    patching file src/Plugin/ProdCheckProcessor/Internal.php
    patching file src/Plugin/ProdCheckProcessor/ProdCheckProcessorBase.php
    patching file src/Plugin/ProdCheckProcessorInterface.php
    patching file src/ProcessorListBuilder.php
    patching file src/ProcessorPluginCollection.php
    patching file src/ProdCheck.php
    patching file templates/prod-check-status-report.html.twig
    āžœ  prod_check git:(2.x) āœ— ..
    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml prod_check
    āžœ  contrib

    RTBC+1 for me.
    Thank you.

  • Status changed to RTBC 4 months ago
  • šŸ‡®šŸ‡³India riddhi.addweb

    The mentioned page issue is resolved, & I have also checked and it is working as expected. I am attaching the Screenshots & doing RTBC for the same.

Production build 0.71.5 2024