Drupal Coding Standards Issues | phpcs

Created on 16 January 2023, over 1 year ago
Updated 22 March 2023, over 1 year ago

Problem/Motivation

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/config_pages.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: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/config_pages.module
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
155 | WARNING | Only string literals should be passed to t() where possible
159 | WARNING | Only string literals should be passed to t() where possible
--------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/config_pages.tokens.inc
------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesAccessControlHandler.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------
30 | ERROR | [x] Inline control structures are not allowed
46 | ERROR | [x] Inline control structures are not allowed
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesContextBase.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
19 | WARNING | Possible useless method overriding detected
-------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Form/ConfigPagesTypeDeleteForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [x] Expected "\Drupal\Core\Entity\EntityStorageInterfacegetQuery" but found
| | "\Drupal\Core\Entity\EntityStorageInterface::getQuery()" for @var tag in member variable comment
24 | ERROR | [ ] Missing parameter comment
24 | ERROR | [x] Data types in @param tags need to be fully namespaced
25 | ERROR | [x] Separate the @param and @throws sections by a blank line.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Entity/ConfigPages.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------
97 | WARNING | [ ] Possible useless method overriding detected
211 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
------------------------------------------------------------------------------------------------------------------------------------------
58 | ERROR | [ ] Type hint "array" missing for $plugin_definition
120 | ERROR | [x] Use null coalesce operator instead of ternary operator.
128 | ERROR | [x] Use null coalesce operator instead of ternary operator.
133 | ERROR | [x] Use null coalesce operator instead of ternary operator.
170 | ERROR | [x] Each PHP statement must be on a line by itself
217 | ERROR | [x] list(...) is forbidden, use [...] instead.
237 | ERROR | [x] list(...) is forbidden, use [...] instead.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

FILE: ...Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Plugin/views/argument_default/CurrentContext.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
49 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Plugin/Block/ConfigPagesBlock.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [ ] Class property $entity_display_repository should use lowerCamel naming without underscores
25 | ERROR | [ ] Missing member variable doc comment
26 | ERROR | [ ] Class property $entity_type_manager should use lowerCamel naming without underscores
26 | ERROR | [ ] Missing member variable doc comment
139 | ERROR | [x] Use null coalesce operator instead of ternary operator.
152 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Controller/ConfigPagesController.php
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------------------------------
30 | ERROR | [ ] Class property $ConfigPagesStorage should use lowerCamel naming without underscores
37 | ERROR | [ ] Class property $ConfigPagesTypeStorage should use lowerCamel naming without underscores
68 | ERROR | [x] Data types in @param tags need to be fully namespaced
160 | ERROR | [ ] Missing parameter type
162 | ERROR | [x] Whitespace found at end of line
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesLoaderService.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------
83 | ERROR | [x] Use null coalesce operator instead of ternary operator.
90 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesTypeForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
30 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesStorage.php
---------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Commands/ConfigPagesCommands.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------------------
22 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
33 | ERROR | [x] Separate the @param and @option sections by a blank line.
42 | ERROR | [ ] Type hint "null" missing for $context
80 | ERROR | [x] Separate the @param and @validate-module-enabled sections by a blank line.
85 | ERROR | [ ] Type hint "null" missing for $context
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Command/SetValueCommand.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
12 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Command/GetValueCommand.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------
10 | WARNING | [x] Unused use statement
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/Routing/ConfigPagesRoutes.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/config_pages/src/ConfigPagesForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------------
82 | ERROR | [ ] Missing parameter comment
82 | ERROR | [x] Data types in @param tags need to be fully namespaced
314 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over multiple lines
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.11

Component

Code

Created by

🇮🇳India sahil.goyal

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.69.0 2024