Created on 27 September 2023, about 1 year ago
Updated 6 November 2023, about 1 year ago

Problem/Motivation

The GitLab CI icon is yellow because of some phpcs coding standards violations.

Steps to reproduce

Proposed resolution

Change code to meet standards.

Remaining tasks

User interface changes

API changes

Data model changes

FILE: ...t_sql-3390223/src/Plugin/views/field/ViewsDateFormatSqlField.php
----------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------
   7 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\views\Plugin\views\field\EntityField.
     |         |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
  23 | ERROR   | [ ] Missing member variable doc comment
     |         |     (Drupal.Commenting.VariableComment.Missing)
  24 | ERROR   | [ ] Class property $format_string should use
     |         |     lowerCamel naming without underscores
     |         |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
  24 | ERROR   | [ ] Missing member variable doc comment
     |         |     (Drupal.Commenting.VariableComment.Missing)
  32 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  42 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  72 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  74 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  76 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  78 | WARNING | [ ] Line exceeds 80 characters; contains 81
     |         |     characters (Drupal.Files.LineLength.TooLong)
  79 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  96 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
  96 | ERROR   | [x] Short array syntax must be used to define
     |         |     arrays
     |         |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 127 | WARNING | [x] Inline @var declarations should use the /** */
     |         |     delimiters
     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
 145 | ERROR   | [x] Use null coalesce operator instead of ternary
     |         |     operator.
     |         |     (SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator.NullCoalesceOperatorNotUsed)
 178 | WARNING | [x] Inline @var declarations should use the /** */
     |         |     delimiters
     |         |     (Drupal.Commenting.InlineVariableComment.VarInline)
 247 | ERROR   | [ ] The array declaration extends to column 87 (the
     |         |     limit is 80). The array content should be split
     |         |     up over multiple lines
     |         |     (Drupal.Arrays.Array.LongLineDeclaration)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...3390223/src/Plugin/views/argument/ViewsDateFormatSqlArgument.php
----------------------------------------------------------------------
FOUND 14 ERRORS AFFECTING 11 LINES
----------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The
    |       |     first wrong one is
    |       |     Drupal\Core\Form\FormStateInterface.
    |       |     (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses)
 19 | ERROR | [ ] Missing member variable doc comment
    |       |     (Drupal.Commenting.VariableComment.Missing)
 20 | ERROR | [ ] Class property $format_string should use lowerCamel
    |       |     naming without underscores
    |       |     (Drupal.NamingConventions.ValidVariableName.LowerCamelName)
 20 | ERROR | [ ] Missing member variable doc comment
    |       |     (Drupal.Commenting.VariableComment.Missing)
 23 | ERROR | [x] Missing function doc comment
    |       |     (Drupal.Commenting.FunctionComment.Missing)
 23 | ERROR | [x] Expected 1 blank line before function; 2 found
    |       |     (Squiz.WhiteSpace.FunctionSpacing.Before)
 34 | ERROR | [x] Short array syntax must be used to define
    |       |     arrays
    |       |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 35 | ERROR | [x] Short array syntax must be used to define
    |       |     arrays
    |       |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 45 | ERROR | [x] Short array syntax must be used to define
    |       |     arrays
    |       |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 51 | ERROR | [x] Short array syntax must be used to define
    |       |     arrays
    |       |     (Drupal.Arrays.DisallowLongArraySyntax.Found)
 62 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, question marks, colons, or closing
    |       |     parentheses
    |       |     (Drupal.Commenting.InlineComment.InvalidEndChar)
 63 | ERROR | [x] You must use "/**" style comments for a function
    |       |     comment
    |       |     (Drupal.Commenting.FunctionComment.WrongStyle)
 64 | ERROR | [x] Expected 1 space after IF keyword; 0 found
    |       |     (Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword)
 64 | ERROR | [x] Expected 1 space after closing parenthesis; found
    |       |     0
    |       |     (Drupal.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 193ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
----------------------------------------------------------------------
FILE                                                  ERRORS  WARNINGS
----------------------------------------------------------------------
...gin/views/argument/ViewsDateFormatSqlArgument.php  14      0
...rc/Plugin/views/field/ViewsDateFormatSqlField.php  14      3
----------------------------------------------------------------------
A TOTAL OF 28 ERRORS AND 3 WARNINGS WERE FOUND IN 12 FILES
----------------------------------------------------------------------
PHPCBF CAN FIX 23 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[x] Drupal.Arrays.DisallowLongArraySyntax.Found                  12
[ ] Drupal.Commenting.VariableComment.Missing                    4
[x] Drupal.Commenting.InlineVariableComment.VarInline            2
[ ] Drupal.NamingConventions.ValidVariableName.LowerCamelName    2
[x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.  2
[ ] Drupal.Arrays.Array.LongLineDeclaration                      1
[x] Drupal.Commenting.FunctionComment.Missing                    1
[x] Drupal.Commenting.FunctionComment.WrongStyle                 1
[x] Drupal.Commenting.InlineComment.InvalidEndChar               1
[x] Drupal.ControlStructures.ControlSignature.SpaceAfterClosePa  1
[x] Drupal.ControlStructures.ControlSignature.SpaceAfterKeyword  1
[ ] Drupal.Files.LineLength.TooLong                              1
[x] SlevomatCodingStandard.ControlStructures.RequireNullCoalesc  1
[x] Squiz.WhiteSpace.FunctionSpacing.Before                      1
----------------------------------------------------------------------
A TOTAL OF 31 SNIFF VIOLATIONS WERE FOUND IN 14 SOURCES
----------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SOURCES AUTOMATICALLY (23 VIOLATIONS IN TOTAL)
----------------------------------------------------------------------
πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bluegeek9

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

Comments & Activities

Production build 0.71.5 2024