Drupal Coding Standards Issues | phpcs

Created on 24 January 2023, almost 2 years ago
Updated 12 July 2024, 6 months ago

Problem/Motivation

Getting following warnings.

FILE: /var/www/html/modules/contrib/go_back/go_back.module
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
18 | WARNING | [x] A comma should follow the last multiline array item. Found: NULL
-------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------

FILE: /var/www/html/modules/contrib/go_back/src/Plugin/Block/GoBack.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
443 | WARNING | [x] '@todo: I didn't see where in the original code they where checking if the previous url belongs to current site, so I left it as it is.' should match
| | the format '@todo Fix problem X here.'
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Time: 2.2 secs; Memory: 6MB

Steps to reproduce

Run following command

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

Proposed resolution

Above warnings need to be fixed.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

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

Production build 0.71.5 2024