Drupal Coding Standards Issues | phpcs

Created on 12 January 2023, almost 2 years ago
Updated 2 June 2024, 7 months ago

Problem/Motivation

Getting following error/warnings

FILE: /var/www/html/modules/contrib/menu_delete/src/Form/MenuDeleteItem.php
----------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 3 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------------------------------------------------------
15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
21 | ERROR | [x] Data types in @var tags need to be fully namespaced
42 | ERROR | [x] Data types in @var tags need to be fully namespaced
49 | ERROR | [x] Data types in @param tags need to be fully namespaced
51 | ERROR | [x] Data types in @param tags need to be fully namespaced
110 | WARNING | [ ] Unused variable $id.
111 | ERROR | [x] list(...) is forbidden, use [...] instead.
132 | WARNING | [ ] Unused variable $id.
133 | ERROR | [x] list(...) is forbidden, use [...] instead.
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 763ms; 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/menu_delete/

Proposed resolution

Above error/warnings need to be fixed

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇳India samit.310@gmail.com

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024