GitLabCI: Fix existing PHPCS issues

Created on 13 June 2024, 3 months ago
Updated 27 June 2024, 3 months ago

Problem/Motivation

$ vendor/bin/phpcs -s $_WEB_ROOT/modules/custom --report-junit=junit.xml --report-full --report-summary --report-source $_PHPCS_EXTRA
FILE: ...onfig_sync/web/modules/custom/config_sync/src/Drush/ConfigSyncCommands.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
 65 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
 66 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 2 spaces but found 4
    |       |     (Drupal.Functions.MultiLineFunctionDeclaration.Indent)
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
Time: 334ms; Memory: 6MB
PHP CODE SNIFFER REPORT SUMMARY
--------------------------------------------------------------------------------
FILE                                                            ERRORS  WARNINGS
--------------------------------------------------------------------------------
...modules/custom/config_sync/src/Drush/ConfigSyncCommands.php  2       0
--------------------------------------------------------------------------------
A TOTAL OF 2 ERRORS AND 0 WARNINGS WERE FOUND IN 21 FILES
--------------------------------------------------------------------------------
PHPCBF CAN FIX 2 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
-----------------------------------------------------------------------------
    SOURCE                                                              COUNT
-----------------------------------------------------------------------------
[x] Drupal.Functions.MultiLineFunctionDeclaration.Indent                1
[x] Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma  1
-----------------------------------------------------------------------------
A TOTAL OF 2 SNIFF VIOLATIONS WERE FOUND IN 2 SOURCES
-----------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SOURCES AUTOMATICALLY (2 VIOLATIONS IN TOTAL)
-----------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joegraduate Arizona, USA

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