Comply with Drupal coding standards (5) (phpcs)

Created on 14 August 2024, 3 months ago
Updated 28 August 2024, 3 months ago

Problem/Motivation

  • Fix the phpcs errors at https://git.drupalcode.org/project/facade/-/jobs/2436462
    FILE: ...odules/tenants/openstack_provider/src/Service/OpenStackProviderService.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     180 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: ...openstack_provider/src/Plugin/EntityReferenceSelection/RegionSelection.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     60 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
        |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: .../openstack_provider/src/Form/Config/OpenStackProviderAdminSettingsForm.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     98 | ERROR | [x] Multi-line function declarations must have a trailing comma
        |       |     after the last parameter
        |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    FILE: ...custom/facade/modules/facade_remote_worker/src/Commands/EntityCommands.php
    --------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 4 LINES
    --------------------------------------------------------------------------------
      71 | ERROR | [x] The first parameter of a multi-line function declaration
         |       |     must be on the line after the opening bracket
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
      73 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
      73 | ERROR | [x] The closing parenthesis of a multi-line function declaration
         |       |     must be on a new line
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
     129 | ERROR | [x] The first parameter of a multi-line function declaration
         |       |     must be on the line after the opening bracket
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
     129 | ERROR | [x] Multi-line function declarations must define one parameter
         |       |     per line
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.OneParamPerLine)
     129 | ERROR | [x] Multi-line function declarations must define one parameter
         |       |     per line
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.OneParamPerLine)
     131 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma)
     131 | ERROR | [x] The closing parenthesis of a multi-line function declaration
         |       |     must be on a new line
         |       |     (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    Time: 598ms; Memory: 10MB
    PHP CODE SNIFFER REPORT SUMMARY
    --------------------------------------------------------------------------------
    FILE                                                            ERRORS  WARNINGS
    --------------------------------------------------------------------------------
    ...odules/facade_remote_worker/src/Commands/EntityCommands.php  8       0
    ...ider/src/Form/Config/OpenStackProviderAdminSettingsForm.php  1       0
    ...der/src/Plugin/EntityReferenceSelection/RegionSelection.php  1       0
    ...openstack_provider/src/Service/OpenStackProviderService.php  1       0
    --------------------------------------------------------------------------------
    A TOTAL OF 11 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX 11 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
    -----------------------------------------------------------------------------
        SOURCE                                                              COUNT
    -----------------------------------------------------------------------------
    [x] Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma  5
    [x] Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine      2
    [x] Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing     2
    [x] Drupal.Functions.MultiLineFunctionDeclaration.OneParamPerLine       2
    -----------------------------------------------------------------------------
    A TOTAL OF 11 SNIFF VIOLATIONS WERE FOUND IN 4 SOURCES
    -----------------------------------------------------------------------------
๐Ÿ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States yas California ๐Ÿ‡บ๐Ÿ‡ธ

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