Fix the issues reported by phpcs

Created on 21 July 2022, over 2 years ago
Updated 19 July 2024, 4 months ago
šŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India Dharti Patel

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

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • šŸ‡ŗšŸ‡¦Ukraine pazhyn Lutsk
  • Status changed to Needs work almost 2 years ago
  • šŸ‡ŗšŸ‡¦Ukraine pazhyn Lutsk

    Tests failed. Needs work.

  • Assigned to vishaljd
  • Merge request !31fix coding standard ā†’ (Closed) created by vishaljd
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 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, report which command has been used, which arguments have been used, and which report that command shown.

  • šŸ‡®šŸ‡³India rassoni Bangalore
  • šŸ‡®šŸ‡³India rassoni Bangalore

    Review patched #12 and applied locally. Below issue still present.

    FILE: ~/projects/drupal-d10/modules/contrib/rabbit_hole/README.md
    ------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------
     31 | WARNING | Line exceeds 80 characters; contains 98 characters
    ------------------------------------------------------------------------------------------
    
    Time: 589ms; Memory: 14MB
    
    
  • Assigned to sourabhjain
  • šŸ‡®šŸ‡³India sourabhjain

    Let me work on #23.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India sourabhjain

    Rashmi after #12 we have more commits and MR so you need to review them.
    Resolved a issue in MR 31. Please review.

  • Status changed to Needs work over 1 year ago
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
    -    // TODO: Switch to trait when/if the patch is committed and released.
    +    // @todo Switch to trait when/if the patch is committed and released.
         // See: https://www.drupal.org/project/group/issues/3177542

    if/when is not necessary.
    It would also be better to make a single comment out of those.

    @todo Switch to trait when the patch on https://www.drupal.org/project/group/issues/3177542 šŸ“Œ Provide test trait with helper methods Needs review is committed.

  • First commit to issue fork.
  • šŸ‡®šŸ‡³India rassoni Bangalore

    @sourabhjain majorly two MR was created and has same code like patch 12. If an issue is using a patch workflow then it is usually best to continue with that. Introducing an multiple MR can cause confusion, as in this case. and sometimes duplication of work.

  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
    -    // TODO: Switch to trait when/if the patch is committed and released.
    -    // See: https://www.drupal.org/project/group/issues/3177542
    -    $storage = \Drupal::entityTypeManager()->getStorage('group_type');
    -    $group_type = $storage->create([
    -      'id' => mb_strtolower($this->randomMachineName()),
    -      'label' => $this->randomString(),
    -    ]);
    -    $storage->save($group_type);
    -    $this->groupType = $group_type;
    +    // Group trait method to created group type.
    +    $this->groupType = $this->createGroupType();

    That is not a change required by the phpcs report shown in the issue summary. Let us keep the focus on what needs to be changed basing on what reported in the issue summary.

  • Status changed to Needs review 9 months ago
  • šŸ‡®šŸ‡³India chaitanyadessai Goa

    Please review patch.

  • Status changed to Needs work 4 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @chaitanyadessai,

    I applied patch #31 and it was applied smoothly. However I still encounter some issues after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml.

    āžœ  rabbit_hole git:(b35e7ec) curl https://www.drupal.org/files/issues/2024-02-13/3298741-31.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 23624  100 23624    0     0   6656      0  0:00:03  0:00:03 --:--:--  6656
    patching file README.md
    patching file modules/rh_group/tests/src/Functional/GroupBehaviorInvocationTest.php
    patching file modules/rh_group/tests/src/Functional/GroupBehaviorSettingsFormTest.php
    patching file modules/rh_media/tests/src/Functional/MediaBehaviorSettingsFormTest.php
    patching file rabbit_hole.module
    patching file rabbit_hole.permissions.yml
    patching file src/BehaviorInvoker.php
    patching file src/Entity/BehaviorSettings.php
    patching file src/EventSubscriber/RabbitHoleSubscriber.php
    patching file src/FormManglerService.php
    patching file src/Plugin/RabbitHoleBehaviorPlugin/AccessDenied.php
    patching file src/Plugin/RabbitHoleBehaviorPlugin/PageNotFound.php
    patching file src/Plugin/RabbitHoleBehaviorPlugin/PageRedirect.php
    patching file src/Plugin/RabbitHoleBehaviorPluginBase.php
    patching file src/Plugin/RabbitHoleBehaviorPluginInterface.php
    patching file src/Plugin/RabbitHoleBehaviorPluginManager.php
    patching file src/Plugin/RabbitHoleEntityPluginManager.php
    patching file src/RabbitHolePermissionGenerator.php
    patching file tests/src/Functional/RabbitHoleBehaviorPluginTest.php
    patching file tests/src/Functional/RabbitHoleBehaviorSettingsEntityMethodsTest.php
    patching file tests/src/Functional/RabbitHolePageRedirectActionTest.php
    āžœ  rabbit_hole git:(b35e7ec) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml rabbit_hole
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/EntityExtender.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
     33 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     34 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     34 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/FormManglerService.php
    -----------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES
    -----------------------------------------------------------------------------------------------------------
      82 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
      82 | ERROR   | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     164 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
     493 | ERROR   | [x] Multi-line function declarations must have a trailing comma after the last parameter
     509 | WARNING | [ ] Unused variable $array_ref.
    -----------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/Plugin/RabbitHoleBehaviorPlugin/PageRedirect.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------------------
      98 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
      98 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     266 | 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/rabbit_hole/src/Plugin/RabbitHoleEntityPluginManager.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     39 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/Plugin/RabbitHoleBehaviorPluginInterface.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
     50 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/Plugin/RabbitHoleBehaviorPluginBase.php
    ----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------
     34 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/BehaviorSettingsManagerInterface.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 2 LINES
    -------------------------------------------------------------------------------------------------------------------------
     54 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     55 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     55 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/RabbitHolePermissionGenerator.php
    ----------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------
     39 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     39 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    ----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/BehaviorInvoker.php
    --------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------
     83 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    --------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/rabbit_hole/src/BehaviorSettingsManager.php
    -------------------------------------------------------------------------------------------------------------------------
    FOUND 6 ERRORS AFFECTING 4 LINES
    -------------------------------------------------------------------------------------------------------------------------
     52 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     53 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     53 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
     90 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
     91 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
     91 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
    -------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------------------------------------------
    
    Time: 1.32 secs; Memory: 12MB
    
    āžœ  contrib git:(main) āœ—

    Thank you.

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

    apaderno ā†’ changed the visibility of the branch 3298741-phpcs-coding-standards to hidden.

  • Pipeline finished with Failed
    4 months ago
    Total: 326s
    #220947
  • šŸ‡®šŸ‡¹Italy apaderno Brescia, šŸ‡®šŸ‡¹
  • Status changed to Closed: outdated 4 months ago
  • šŸ‡ŗšŸ‡øUnited States japerry KVUO
Production build 0.71.5 2024