Fix the issues reported by phpcs

Created on 7 July 2023, over 1 year ago
Updated 8 March 2024, 9 months ago

Problem/Motivation

PHPCS throws the following errors when run on the module:

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/group_content_menu.post_update.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------
49 | ERROR | The array declaration extends to column 121 (the limit is 120). The array content should be split up over multiple lines
76 | ERROR | The array declaration extends to column 122 (the limit is 120). The array content should be split up over multiple lines
---------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/tests/src/Functional/GroupContentMenuTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
161 | WARNING | Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/src/Access/GroupOwnsMenuContentAccessChecker.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------
77 | WARNING | Line exceeds 80 characters; contains 83 characters
--------------------------------------------------------------------------------------------------------------------------------------------

Time: 881ms; Memory: 14MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs work

Version

3.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

Merge Requests

Comments & Activities

  • Issue created by @sidharth_soman
  • Merge request !18Fixed phpcs issues. → (Open) created by sidharth_soman
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update over 1 year ago
    6 pass
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India sidharth_soman Bangalore

    All issues fixed except for the 'line exceeds 80 characters' errors. I'm leaving those as it is due to readability purposes.

  • Status changed to Needs work 9 months ago
  • 🇮🇳India Ashutosh Ahirwal India

    Hi I have reviewed the MR and it resolve the issue but there are still some issue remains.
    Moving this to Need Work for get it done.

    Used command:-./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/group_content_menu

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/group_content_menu.post_update.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------
    49 | ERROR | The array declaration extends to column 121 (the limit is 120). The array content should be split up over multiple lines
    76 | ERROR | The array declaration extends to column 122 (the limit is 120). The array content should be split up over multiple lines
    ---------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/tests/src/Functional/GroupContentMenuTest.php
    -----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------------------
    161 | WARNING | Line exceeds 80 characters; contains 82 characters
    -----------------------------------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/group_content_menu/src/Access/GroupOwnsMenuContentAccessChecker.php
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------------------------------
    77 | WARNING | Line exceeds 80 characters; contains 83 characters
    --------------------------------------------------------------------------------------------------------------------------------------------

    Time: 881ms; Memory: 14MB

  • 🇮🇳India zkhan.aamir

    Issue summary updated.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 9 months ago
    2 fail
  • Hi,
    Applied MR!18 and checked for phpcs errors and warnings.
    There are no errors found.

Production build 0.71.5 2024