Drupal Coding Standards Issues | phpcs

Created on 17 January 2023, almost 2 years ago
Updated 31 May 2024, 6 months ago

Problem/Motivation

FILE: ...rs/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/tests/src/Kernel/EntitySubQueueAPITest.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
40 | ERROR | Public method name "EntitySubQueueAPITest::testSubqueueAPI" is not in lowerCamel format
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/tests/src/Kernel/EntityQueueCacheTagsTest.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
23 | ERROR | The array declaration extends to column 127 (the limit is 80). The array content should be split up over multiple
| | lines
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...contrib10/drupal10/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/EntityQueueHandler/SmartQueue.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | [ ] Missing short description in doc comment
105 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
240 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...l10/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/views/argument/EntityQueueSmartQueueArgument.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | Missing short description in doc comment
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueInterface.php
----------------------------------------------------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------------------------------------
15 | ERROR | Description for the @return value is missing
40 | ERROR | Description for the @return value is missing
52 | ERROR | Type hint "\Drupal\entityqueue\EntityQueueHandlerInterface" missing for $handler
65 | ERROR | Description for the @return value is missing
72 | ERROR | Description for the @return value is missing
84 | ERROR | Description for the @return value is missing
95 | ERROR | Description for the @return value is missing
----------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntitySubqueueInterface.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------
59 | ERROR | [x] Parameter comment must end with a full stop
-------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Form/EntitySubqueueForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------
287 | ERROR | The array declaration extends to column 145 (the limit is 80). The array content should be split up over
| | multiple lines
291 | ERROR | The array declaration extends to column 143 (the limit is 80). The array content should be split up over
| | multiple lines
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Form/EntityQueueForm.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------------------------
248 | ERROR | The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple
| | lines
248 | ERROR | The array declaration extends to column 92 (the limit is 80). The array content should be split up over multiple
| | lines
374 | ERROR | The array declaration extends to column 87 (the limit is 80). The array content should be split up over multiple
| | lines
375 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up over multiple
| | lines
415 | ERROR | The array declaration extends to column 139 (the limit is 80). The array content should be split up over
| | multiple lines
419 | ERROR | The array declaration extends to column 137 (the limit is 80). The array content should be split up over
| | multiple lines
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueHandlerInterface.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
35 | ERROR | Description for the @return value is missing
45 | ERROR | Description for the @return value is missing
-----------------------------------------------------------------------------------------------------------------------------

FILE: ...rs/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntitySubqueueAccessControlHandler.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 3 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------
25 | ERROR | [x] Case breaking statements must be followed by a single blank line
26 | WARNING | [ ] Code after the RETURN statement on line 25 cannot be executed
29 | ERROR | [x] Case breaking statements must be followed by a single blank line
29 | ERROR | [ ] The array declaration extends to column 162 (the limit is 80). The array content should be split up over
| | multiple lines
30 | WARNING | [ ] Code after the RETURN statement on line 29 cannot be executed
35 | ERROR | [ ] The array declaration extends to column 172 (the limit is 80). The array content should be split up over
| | multiple lines
39 | ERROR | [x] Case breaking statements must be followed by a single blank line
40 | WARNING | [ ] Code after the RETURN statement on line 39 cannot be executed
52 | ERROR | [ ] The array declaration extends to column 165 (the limit is 80). The array content should be split up over
| | multiple lines
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntitySubqueueListBuilder.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------------
65 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
---------------------------------------------------------------------------------------------------------------------------

FILE: ...Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueAccessControlHandler.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------------------------
26 | WARNING | Code after the RETURN statement on line 24 cannot be executed
31 | ERROR | The array declaration extends to column 158 (the limit is 80). The array content should be split up over
| | multiple lines
33 | WARNING | Code after the RETURN statement on line 31 cannot be executed
36 | ERROR | The array declaration extends to column 158 (the limit is 80). The array content should be split up over
| | multiple lines
38 | WARNING | Code after the RETURN statement on line 36 cannot be executed
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Entity/EntityQueue.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------
147 | ERROR | [x] Use null coalesce operator instead of ternary operator.
330 | ERROR | [ ] The array declaration extends to column 99 (the limit is 80). The array content should be split up over
| | multiple lines
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...cuments/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 3 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------------------------------------------------------------
14 | WARNING | [x] Unused use statement
128 | ERROR | [ ] The array declaration extends to column 86 (the limit is 80). The array content should be split up over
| | multiple lines
146 | ERROR | [ ] The array declaration extends to column 83 (the limit is 80). The array content should be split up over
| | multiple lines
146 | ERROR | [ ] The array declaration extends to column 82 (the limit is 80). The array content should be split up over
| | multiple lines
153 | WARNING | [x] A comma should follow the last multiline array item. Found: 'entityqueue-edit-item-link'
237 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
240 | ERROR | [ ] The array declaration extends to column 130 (the limit is 80). The array content should be split up over
| | multiple lines
349 | ERROR | [x] Use null coalesce operator instead of ternary operator.
350 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Plugin/views/sort/EntityQueuePosition.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
69 | ERROR | Doc comment short description must start with a capital letter
--------------------------------------------------------------------------------------------------------------------------------

FILE: .../sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Plugin/views/sort/EntityQueueInQueue.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
69 | ERROR | Doc comment short description must start with a capital letter
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...ahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Plugin/views/field/EntityQueuePosition.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
69 | ERROR | Doc comment short description must start with a capital letter
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Plugin/views/relationship/EntityQueueRelationship.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
186 | 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/entityqueue/src/Annotation/EntityQueueHandler.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
33 | ERROR | The @var tag must be the first tag in a member variable comment
-------------------------------------------------------------------------------------------------------------------------------

FILE: ...rs/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/Controller/EntityQueueUIController.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------------------------------
30 | ERROR | [x] Data types in @var tags need to be fully namespaced
35 | ERROR | [x] Doc comment short description must end with a full stop
37 | ERROR | [x] Data types in @param tags need to be fully namespaced
51 | ERROR | [x] Expected 1 blank line after function; 2 found
114 | ERROR | [ ] The array declaration extends to column 190 (the limit is 80). The array content should be split up over
| | multiple lines
125 | ERROR | [ ] The array declaration extends to column 187 (the limit is 80). The array content should be split up over
| | multiple lines
234 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
--------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueRepositoryInterface.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
9 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueListBuilder.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------
127 | ERROR | The array declaration extends to column 90 (the limit is 80). The array content should be split up over multiple
| | lines
127 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over multiple
| | lines
--------------------------------------------------------------------------------------------------------------------------------

FILE: ...rs/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueHandlerPluginCollection.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------
41 | ERROR | Description for the @return value is missing
43 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueuePermissions.php
------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
18 | ERROR | Description for the @return value is missing
36 | ERROR | Description for the @return value is missing
------------------------------------------------------------------------------------------------------------------------

FILE: /Users/sahil.goyal/Documents/MySites/contrib10/drupal10/modules/contrib/entityqueue/src/EntityQueueRepository.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------
10 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Needs work

Version

1.5

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.

  • Status changed to Needs review almost 2 years ago
  • Status changed to Needs work almost 2 years ago
  • Assigned to alanmoreira
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Charchil Khandelwal โ†’ made their first commit to this issueโ€™s fork.

  • @charchil-khandelwal opened merge request.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Charchil Khandelwal

    Created MR!
    Please review.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    I reviewed MR!15, and there are still remaining issues reported by phpcs shown below:

    FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/entityqueue/tests/modules/entityqueue_test/entityqueue_test.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/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/entityqueue/entityqueue.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/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/entityqueue/modules/entityqueue_smartqueue/entityqueue_smartqueue.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/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/entityqueue/modules/entityqueue_smartqueue/src/Plugin/EntityQueueHandler/SmartQueue.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
     230 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     259 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/studenttrainees/Drupal.org/drupalorg-site/docroot/modules/contrib/entityqueue/src/EntityQueueHandlerPluginCollection.php
    -------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------------
     44 | WARNING | Possible useless method overriding detected
    -------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 1.67 secs; Memory: 14MB

    Please check.
    Thank You.

  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    4 pass
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Please review with the dev branch. Resolved the other issues.

  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡ท๐Ÿ‡ดRomania amateescu

    Needs a rebase.

Production build 0.71.5 2024