Drupal Coding Standards Issues | phpcs

Created on 27 January 2023, about 2 years ago
Updated 10 July 2024, 9 months ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/10.1.x/drupal/modules/contrib/tokendebug/src/Form/TokenDebugForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 5 WARNINGS AFFECTING 13 LINES
------------------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Missing class doc comment
13 | ERROR | [x] Missing function doc comment
85 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
91 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
95 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
103 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
| | instead
111 | ERROR | [ ] Missing short description in doc comment
112 | ERROR | [ ] Missing parameter comment
113 | ERROR | [ ] Missing parameter comment
114 | ERROR | [ ] Description for the @return value is missing
116 | ERROR | [ ] Type hint "array" missing for $violations
119 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
131 | ERROR | [x] list(...) is forbidden, use [...] instead.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Fix the PHP coding standard issues.

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024