Fix coding standard related errors

Created on 23 May 2016, about 9 years ago
Updated 28 July 2025, 5 days ago

When running the module code against Drupal coding standards based on Drupal standard, the module shows errors

phpcs -s --standard=Drupal sites/default/modules/display_field_copy/

FILE: ...dules/display_field_copy/src/Plugin/DsField/DisplayFieldCopy.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
 61 | ERROR | [x] The first parameter of a multi-line function
    |       |     declaration must be on the line after the opening
    |       |     bracket
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
 62 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 63 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 64 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 65 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 66 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 66 | ERROR | [x] The closing parenthesis of a multi-line function
    |       |     declaration must be on a new line
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ...ult/modules/display_field_copy/src/Form/DisplayFieldCopyForm.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
 45 | ERROR | [x] The first parameter of a multi-line function
    |       |     declaration must be on the line after the opening
    |       |     bracket
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.FirstParamSpacing)
 46 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 47 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 48 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 49 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 50 | ERROR | [x] Multi-line function declaration not indented correctly;
    |       |     expected 6 spaces but found 30
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.Indent)
 50 | ERROR | [x] The closing parenthesis of a multi-line function
    |       |     declaration must be on a new line
    |       |     (Squiz.Functions.MultiLineFunctionDeclaration.CloseBracketLine)
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 82ms; Memory: 6Mb
πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States anoopjohn Washington D. C.

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024