Fix the issues reported by phpcs

Created on 28 June 2022, over 2 years ago
Updated 16 August 2024, 4 months ago
๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia ashutosh ahirwal India

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.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia arunkumark Coimbatore

    Verified the patch is not applied to the latest version of the module. Tested on the latest 8.x-2.x version.

    Still below PHPCS issues need to fix,

    FILE: /var/www/html/web/modules/custom/menu_item_role_access/src/Form/ConfigForm.php
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/web/modules/custom/menu_item_role_access/src/MenuItemRoleAccessLinkTreeManipulator.php
    -----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------
     79 | WARNING | MenuLinkContent::load calls should be avoided in classes, use dependency injection instead
     91 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------------------
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia arunkumark Coimbatore
  • ๐Ÿ‡ฎ๐Ÿ‡น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.

  • First commit to issue fork.
  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Needs work is for the issue summary that has not been updated.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia indrapatil Bangalore
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada imustakim Canada
  • Assigned to hardikpandya
  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia hardikpandya

    Referring to the MR, there are still issues pending.

    FILE: tests/src/Functional/PermissionsTest.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------
     68 | ERROR | The array declaration extends to column 96 (the limit is 80). The array content should be split up over multiple lines
    -------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: menu_item_role_access.module
    --------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------
     24 | WARNING | Unused variable $config.
    --------------------------------------------------------------------------------------
    
    
    FILE: src/MenuItemRoleAccessLinkTreeManipulator.php
    -----------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    -----------------------------------------------------------------------------------------------------------
     79 | WARNING | MenuLinkContent::load calls should be avoided in classes, use dependency injection instead
     91 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    -----------------------------------------------------------------------------------------------------------
    
    Time: 406ms; Memory: 10MB
    
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia hardikpandya

    Rebased and fixed all phpcs issues. Please consider MR-4 for review.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    4 fail
  • Status changed to Needs work about 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom LiamPower
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 12 months ago
    Patch Failed to Apply
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia zkhan.aamir

    Hi,

    I applied patch #20

    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/menu_item_role_access (8.x-2.x)
    $ curl https://git.drupalcode.org/project/menu_item_role_access/-/merge_requests/4.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2612    0  2612    0     0   7013      0 --:--:-- --:--:-- --:--:--  7040
    patching file menu_item_role_access.module
    patching file src/Form/ConfigForm.php
    patching file src/MenuItemRoleAccessLinkTreeManipulator.php
    

    Still showing error

    
    Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib
    $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml menu_item_role_access/
    
    FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\menu_item_role_access\src\MenuItemRoleAccessLinkTreeManipulator.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
     37 | ERROR | Parameter $module_handler is not described in comment
    ------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 332ms; Memory: 10MB
    
  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update 11 months ago
    6 fail
  • Pipeline finished with Failed
    11 months ago
    Total: 274s
    #79189
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Assigned to nitin_lama
  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    No phpcs issues report on running the command. Please review the MR.

  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Status changed to RTBC 7 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines cleavinjosh

    Hi @nitin_lama,

    I applied MR!4 and has not found any issues after running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml.

    โžœ  menu_item_role_access git:(c0999d0) โœ— curl https://git.drupalcode.org/project/menu_item_role_access/-/merge_requests/4.diff | git apply -v
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7025    0  7025    0     0  19031      0 --:--:-- --:--:-- --:--:-- 19037
    Checking patch menu_item_role_access.module...
    Checking patch src/Form/ConfigForm.php...
    Checking patch src/MenuItemRoleAccessLinkTreeManipulator.php...
    Checking patch tests/src/Functional/MenuItemDisplayBrowserTestBase.php...
    Hunk #2 succeeded at 70 (offset 5 lines).
    Checking patch tests/src/Functional/PermissionsUpdateMenuLinkContentTest.php...
    Checking patch tests/src/Functional/SpecialRoutesTest.php...
    Applied patch menu_item_role_access.module cleanly.
    Applied patch src/Form/ConfigForm.php cleanly.
    Applied patch src/MenuItemRoleAccessLinkTreeManipulator.php cleanly.
    Applied patch tests/src/Functional/MenuItemDisplayBrowserTestBase.php cleanly.
    Applied patch tests/src/Functional/PermissionsUpdateMenuLinkContentTest.php cleanly.
    Applied patch tests/src/Functional/SpecialRoutesTest.php cleanly.
    โžœ  menu_item_role_access git:(c0999d0) โœ— ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml menu_item_role_access
    โžœ  contrib git:(main) โœ—

    Thank you.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Pipeline finished with Success
    7 months ago
    Total: 192s
    #193786
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Status changed to Needs review 7 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • Pipeline finished with Success
    7 months ago
    Total: 192s
    #193794
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Failed
    6 months ago
    Total: 277s
    #202949
  • Pipeline finished with Failed
    6 months ago
    Total: 204s
    #203184
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia riddhi.addweb

    I have applied the latest patch with MR !6 and it works proper.
    All the Errors and warnings are solved.
    Please check the Screenshot for the same.

  • Status changed to RTBC 6 months ago
  • Merge request !10Updated PHPCS issues reported โ†’ (Merged) created by LiamPower
  • Pipeline finished with Skipped
    5 months ago
    #241823
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom LiamPower
  • Status changed to Fixed 5 months ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom LiamPower
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024