Address phpcs errors

Created on 25 June 2025, 11 days ago

Problem/Motivation

Upon submission of a merge request with Gitlab CI enabled, phpcs reports:

FILE: src/EventSubscriber/RedirectComingSoonSubscriber.php
------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
51 | ERROR | Missing parameter comment (Drupal.Commenting.FunctionComment.MissingParamComment)
53 | ERROR | Parameter tags must be grouped together in a doc comment (Drupal.Commenting.DocComment.ParamGroup)
55 | ERROR | Parameter tags must be grouped together in a doc comment (Drupal.Commenting.DocComment.ParamGroup)
57 | ERROR | Parameter tags must be grouped together in a doc comment (Drupal.Commenting.DocComment.ParamGroup)
59 | ERROR | Parameter tags must be grouped together in a doc comment (Drupal.Commenting.DocComment.ParamGroup)
59 | ERROR | Doc comment for parameter $current_path does not match actual variable name
| | (Drupal.Commenting.FunctionComment.ParamNameNoMatch)
88 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
| | (Drupal.Commenting.DocComment.ShortSingleLine)
------------------------------------------------------------------------------------------------------------------------
FILE: src/Controller/ComingsoonController.php
-----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
38 | ERROR | Parameter tags must be grouped together in a doc comment (Drupal.Commenting.DocComment.ParamGroup)
-----------------------------------------------------------------------------------------------------------------
FILE: comingsoon_mode.module
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
3 | ERROR | Missing short description in doc comment (Drupal.Commenting.DocComment.MissingShort)
30 | WARNING | Code after the RETURN statement on line 28 cannot be executed (Squiz.PHP.NonExecutableCode.Unreachable)
------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

https://git.drupalcode.org/issue/comingsoon_mode-3532416/-/jobs/5674875

Proposed resolution

Supply the missing comments and return statement.

Remaining tasks

Make a MR.

πŸ“Œ Task
Status

Active

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024