Coding standards - PHPCS (fix failing pipeline)

Created on 22 August 2024, 3 months ago
Updated 23 August 2024, 3 months ago

Problem/Motivation

Coding standards

Proposed resolution

Fix issues flagged in https://git.drupalcode.org/project/hide_submit/-/jobs/2476339

Remaining tasks

Run checks and fix any outstanding coding standards issues.

FILE: ..._submit/web/modules/custom/hide_submit/src/Service/HideSubmitFormAlter.php
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 1 WARNING AFFECTING 8 LINES
--------------------------------------------------------------------------------
 11 | ERROR   | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
 17 | ERROR   | Missing member variable doc comment
    |         | (Drupal.Commenting.VariableComment.Missing)
 18 | ERROR   | Missing member variable doc comment
    |         | (Drupal.Commenting.VariableComment.Missing)
 19 | ERROR   | Missing member variable doc comment
    |         | (Drupal.Commenting.VariableComment.Missing)
 27 | ERROR   | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
 33 | WARNING | Line exceeds 80 characters; contains 86 characters
    |         | (Drupal.Files.LineLength.TooLong)
 39 | ERROR   | Comment indentation error, expected only 1 spaces
    |         | (Drupal.Commenting.InlineComment.SpacingBefore)
 55 | ERROR   | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
--------------------------------------------------------------------------------
FILE: ..._submit/web/modules/custom/hide_submit/src/Form/HideSubmitSettingsForm.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 13 | ERROR | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
--------------------------------------------------------------------------------
FILE: ...mit/web/modules/custom/hide_submit/src/Controller/HideSubmitController.php
--------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------
 10 | ERROR | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
 15 | ERROR | Missing member variable doc comment
    |       | (Drupal.Commenting.VariableComment.Missing)
 21 | ERROR | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
 30 | ERROR | Doc comment is empty (Drupal.Commenting.DocComment.Empty)
--------------------------------------------------------------------------------
FILE: ...ilds/project/hide_submit/web/modules/custom/hide_submit/hide_submit.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 3 | ERROR | Missing short description in doc comment
   |       | (Drupal.Commenting.DocComment.MissingShort)
--------------------------------------------------------------------------------
FILE: ...lds/project/hide_submit/web/modules/custom/hide_submit/hide_submit.install
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 5 | ERROR | Doc comment short description must start with a capital letter
   |       | (Drupal.Commenting.DocComment.ShortNotCapital)
 6 | ERROR | Doc comment short description must be on a single line, further
   |       | text should be a separate paragraph
   |       | (Drupal.Commenting.DocComment.ShortSingleLine)
--------------------------------------------------------------------------------
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom RhiP

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