Drupal Coding Standards Issues | phpcs

Created on 1 February 2023, over 1 year ago
Updated 4 December 2023, 7 months ago

Problem/Motivation

Getting following error/warnings.

FILE: C:\xampp\htdocs\abc\drupal\modules\nameday_skhu\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
18 | WARNING | Line exceeds 80 characters; contains 129 characters
----------------------------------------------------------------------

FILE: ...ampp\htdocs\abc\drupal\modules\nameday_skhu\src\NamedayClass.php
----------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
10 | ERROR | Missing short description in doc comment
11 | ERROR | Missing parameter comment
12 | ERROR | Missing parameter comment
12 | ERROR | Missing parameter type
13 | ERROR | Missing parameter comment
13 | ERROR | Missing parameter type
14 | ERROR | Missing parameter comment
14 | ERROR | Missing parameter type
15 | ERROR | Description for the @return value is missing
211 | ERROR | Doc comment is empty
----------------------------------------------------------------------

FILE: ...\drupal\modules\nameday_skhu\src\Plugin\Block\NamedayBlockHu.php
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------
20 | ERROR | Missing short description in doc comment
25 | ERROR | Missing short description in doc comment
26 | ERROR | Missing parameter comment
26 | ERROR | Missing parameter name
33 | ERROR | Missing short description in doc comment
34 | ERROR | Missing parameter comment
35 | ERROR | Missing parameter comment
36 | ERROR | Missing parameter comment
37 | ERROR | Missing parameter comment
----------------------------------------------------------------------

FILE: ...\drupal\modules\nameday_skhu\src\Plugin\Block\NamedayBlockSk.php
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 8 LINES
----------------------------------------------------------------------
20 | ERROR | Missing short description in doc comment
25 | ERROR | Missing short description in doc comment
26 | ERROR | Missing parameter comment
26 | ERROR | Missing parameter name
33 | ERROR | Missing short description in doc comment
34 | ERROR | Missing parameter comment
35 | ERROR | Missing parameter comment
36 | ERROR | Missing parameter comment
37 | ERROR | Missing parameter comment
----------------------------------------------------------------------

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/nameday_skhu/

Proposed resolution

Above error/warnings need to be fixed.

๐Ÿ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024