Fix the issues reported by phpcs

Created on 7 July 2023, 12 months ago
Updated 8 March 2024, 4 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 12 months ago
    6 pass
  • Issue was unassigned.
  • Status changed to Needs review 12 months 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 4 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.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Preethy_ray

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

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 8
    last update 4 months ago
    2 fail
  • Hi,
    Applied MR!18 and checked for phpcs errors and warnings.
    There are no errors found.

Production build 0.69.0 2024