Fix the issues reported by PHP_CodeSniffer

Created on 9 September 2024, 3 months ago
Updated 16 September 2024, 2 months ago

Problem/Motivation

FILE: navigation_extra\navigation_extra.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------

FILE: navigation_extra\navigation_extra.install
------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------
8 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
8 | WARNING | [x] 'TODO: Upon install check if the navigationcontent block is enabled, disable it and' should match the format '@todo Fix problem X here.'
9 | ERROR | [ ] Comment indentation error, expected only 1 spaces
------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------------------

FILE: navigation_extra\navigation_extra.links.task.yml
------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 3 found
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------

FILE: navigation_extra\navigation_extra.module
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: navigation_extra\src\NavigationExtraContentLinks.php
----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

FILE: navigation_extra\src\NavigationExtraPluginBase.php
-------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AND 1 WARNING AFFECTING 9 LINES
-------------------------------------------------------------------------------------------------------
22 | WARNING | [x] Unused use statement
309 | ERROR | [ ] Parameter $link_name is not described in comment
472 | ERROR | [ ] Doc comment for parameter $parent does not match actual variable name
522 | ERROR | [ ] Parameter $parent is not described in comment
582 | ERROR | [ ] Parameter $parent is not described in comment
678 | ERROR | [x] Expected 1 blank line after function; 2 found
681 | ERROR | [x] Missing function doc comment
681 | ERROR | [x] Visibility must be declared on method "addCreateEntityLinks"
741 | ERROR | [x] Expected 1 blank line after function; 0 found
742 | ERROR | [x] The closing brace for the class must have an empty line before it
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------

FILE: navigation_extra\src\NavigationExtraPluginInterface.php
-------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
78 | ERROR | [x] Doc comment short description must start with a capital letter
-------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------

FILE: navigation_extra\src\Plugin\Menu\RecentMenuLinkEntity.php
---------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------
44 | WARNING | Line exceeds 80 characters; contains 83 characters
---------------------------------------------------------------------------------------------

FILE: navigation_extra\src\Plugin\Navigation\Extra\TaxonomiesPlugin.php
-----------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------
37 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
38 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
39 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
40 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
47 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
80 | ERROR | [x] Expected 1 blank line after function; 0 found
81 | ERROR | [x] The closing brace for the class must have an empty line before it
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: navigation_extra\src\Plugin\Navigation\Extra\VersionPlugin.php
---------------------------------------------------------------------------------------------------
FOUND 14 ERRORS AND 6 WARNINGS AFFECTING 19 LINES
---------------------------------------------------------------------------------------------------
8 | WARNING | [x] Unused use statement
127 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
229 | ERROR | [x] Missing function doc comment
268 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
282 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
296 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
333 | ERROR | [x] Missing function doc comment
373 | ERROR | [x] Missing function doc comment
376 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
376 | ERROR | [x] Expected one space after the comma, 2 found
422 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
436 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
459 | ERROR | [x] Missing function doc comment
472 | ERROR | [x] Missing function doc comment
485 | ERROR | [x] Missing function doc comment
579 | ERROR | [x] Concat operator must be surrounded by a single space
598 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
691 | ERROR | [x] Missing function doc comment
700 | ERROR | [x] Missing function doc comment
709 | ERROR | [x] Missing function doc comment
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------

Steps to reproduce

Run phpcs command to get the drupal coding standard issues.

Proposed resolution

Many of the issues can be fixed by running the phpcbf command. For the remaining ones, we will need to manually address and then commit these changes before pushing them.

📌 Task
Status

Needs review

Version

1.0

Component

Code

Created by

🇺🇸United States sunil jolapara 3265 Summitrun Drive, Independence, KY, 41051

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

Comments & Activities

Production build 0.71.5 2024