Problem/Motivation

As you can see the pipelines report issues with PHPCS => https://git.drupalcode.org/project/navigation_extra/-/jobs/6567155

FILE: src/NavigationExtraPluginManager.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------
 87 | ERROR | [x] Expected 1 blank line after function; 2 found (Squiz.WhiteSpace.FunctionSpacing.After)
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------
FILE: src/Plugin/Navigation/Extra/ToolsPlugin.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
 186 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
     |       |     (Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines)
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: src/Plugin/Navigation/Extra/BlocksPlugin.php
------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
 87 | ERROR | [x] Array indentation error, expected 8 spaces but found 10 (Drupal.Arrays.Array.ArrayIndentation)
 88 | ERROR | [x] Array indentation error, expected 8 spaces but found 10 (Drupal.Arrays.Array.ArrayIndentation)
 89 | ERROR | [x] Array indentation error, expected 8 spaces but found 10 (Drupal.Arrays.Array.ArrayIndentation)
 90 | ERROR | [x] Array indentation error, expected 8 spaces but found 10 (Drupal.Arrays.Array.ArrayIndentation)
 91 | ERROR | [x] Array indentation error, expected 8 spaces but found 10 (Drupal.Arrays.Array.ArrayIndentation)
 98 | ERROR | [x] Array closing indentation error, expected 6 spaces but found 8
    |       |     (Drupal.Arrays.Array.ArrayClosingIndentation)
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: src/Annotation/NavigationExtraPlugin.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
 57 | ERROR | [x] The closing brace for the class must have an empty line before it
    |       |     (Drupal.Classes.ClassDeclaration.CloseBraceAfterBody)
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: navigation_extra.module
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
 87 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
    |       |     (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing)
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
Time: 526ms; Memory: 10MB
PHP CODE SNIFFER REPORT SUMMARY
----------------------------------------------------------------------
FILE                                                  ERRORS  WARNINGS
----------------------------------------------------------------------
navigation_extra.module                               1       0
src/NavigationExtraPluginManager.php                  1       0
src/Annotation/NavigationExtraPlugin.php              1       0
src/Plugin/Navigation/Extra/BlocksPlugin.php          6       0
src/Plugin/Navigation/Extra/ToolsPlugin.php           1       0
----------------------------------------------------------------------
A TOTAL OF 10 ERRORS AND 0 WARNINGS WERE FOUND IN 34 FILES
----------------------------------------------------------------------
PHPCBF CAN FIX 10 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
PHP CODE SNIFFER VIOLATION SOURCE SUMMARY
----------------------------------------------------------------------
    SOURCE                                                       COUNT
----------------------------------------------------------------------
[x] Drupal.Arrays.Array.ArrayIndentation                         5
[x] Drupal.Arrays.Array.ArrayClosingIndentation                  1
[x] Drupal.Classes.ClassDeclaration.CloseBraceAfterBody          1
[x] Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing   1
[x] Squiz.WhiteSpace.FunctionSpacing.After                       1
[x] Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines            1
----------------------------------------------------------------------
A TOTAL OF 10 SNIFF VIOLATIONS WERE FOUND IN 6 SOURCES
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SOURCES AUTOMATICALLY (10 VIOLATIONS IN TOTAL)
----------------------------------------------------------------------

Steps to reproduce

https://git.drupalcode.org/project/navigation_extra/-/jobs/6567155

Proposed resolution

Fix the issues.

Remaining tasks

Create MR with the fixes.

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tim-diels created an issue. See original summary.

tim-diels’s picture

Issue summary: View changes
amangupta’s picture

Assigned: Unassigned » amangupta

i will work on it

tim-diels’s picture

Are you done with the changes or are you still working on this issue @amangupta?
Please update the issue status and assignee so other know what can be done with this issue.

amangupta’s picture

Assigned: amangupta » Unassigned
Status: Active » Needs review
paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I reviewed MR!24, and confirmed PHPCS is now passed on Gitlab CI.

Moving this to RTBC!
Thank you.

tim-diels’s picture

Status: Reviewed & tested by the community » Needs work

Thank you for the work done. A piece of the code has changed and so this needs a rebase.

tim-diels’s picture

Status: Needs work » Needs review

Rebased.

tim-diels’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.