Fix the PHP_CodeSniffer warnings/errors shown in GitLab CI tests

Created on 1 February 2024, 10 months ago
Updated 15 February 2024, 9 months ago

Now that GitLab CI tests are enabled, the warnings/errors reported by PHP_CodeSniffer must be fixed.

FILE: ...rt_scale_formatter/src/Plugin/Field/FieldFormatter/ShortScaleFormatter.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  10 | ERROR | Missing short description in doc comment
     |       | (Drupal.Commenting.DocComment.MissingShort)
 163 | ERROR | The array declaration extends to column 123 (the limit is 120).
     |       | The array content should be split up over multiple lines
     |       | (Drupal.Arrays.Array.LongLineDeclaration)
 179 | ERROR | The array declaration extends to column 123 (the limit is 120).
     |       | The array content should be split up over multiple lines
     |       | (Drupal.Arrays.Array.LongLineDeclaration)
--------------------------------------------------------------------------------
FILE: ...tter/web/modules/custom/short_scale_formatter/short_scale_formatter.module
--------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------
 14 | WARNING | [ ] Hook implementations should not duplicate @param
    |         |     documentation (Drupal.Commenting.HookComment.HookParamDoc)
 14 | ERROR   | [ ] Missing parameter comment
    |         |     (Drupal.Commenting.FunctionComment.MissingParamComment)
 14 | ERROR   | [ ] Missing parameter type
    |         |     (Drupal.Commenting.FunctionComment.MissingParamType)
 15 | WARNING | [ ] Hook implementations should not duplicate @param
    |         |     documentation (Drupal.Commenting.HookComment.HookParamDoc)
 15 | ERROR   | [ ] Missing parameter comment
    |         |     (Drupal.Commenting.FunctionComment.MissingParamComment)
 16 | WARNING | [ ] Hook implementations should not duplicate @return
    |         |     documentation (Drupal.Commenting.HookComment.HookReturnDoc)
 16 | ERROR   | [x] Separate the @param and @return sections by a blank line.
    |         |     (Drupal.Commenting.DocComment.TagGroupSpacing)
 16 | ERROR   | [ ] Description for the @return value is missing
    |         |     (Drupal.Commenting.FunctionComment.MissingReturnComment)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 163ms; Memory: 6MB
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

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