Fix issues reported by PHPCS

Created on 2 January 2025, 3 months ago

Problem/Motivation

Here is a list of the phpcs issues to fix:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml toolbar_menu_clean/

FILE: /var/www/web/modules/contrib/toolbar_menu_clean/toolbar_menu_clean.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------


FILE: /var/www/web/modules/contrib/toolbar_menu_clean/toolbar_menu_clean.module
-------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------
 31 | ERROR | [x] Whitespace found at end of line
 35 | ERROR | [x] Whitespace found at end of line
-------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------

Time: 142ms; Memory: 10MB

Steps to reproduce

Run the command,
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml funnelback/

Proposed resolution

Fix the phpcs issues.

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇮🇳India abhiyanshu

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

Comments & Activities

  • Issue created by @abhiyanshu
  • First commit to issue fork.
  • 🇵🇭Philippines clarkssquared

    Hi @ggh,

    I saw that you moved this ticket to needs review but there's no MR nor a patch file to be tested?

  • I have tested the changes from the issue fork 3496973-fix-issues-reported by cloning the repository and updating the toolbar_menu_clean module in my Drupal setup.

    After running the PHPCS command:

    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml toolbar_menu_clean/

    No PHPCS errors or warnings were found.

    The issue appears to be resolved, and the code follows Drupal coding standards.

    Status: Works as expected.

Production build 0.71.5 2024