Phpcs coding standard bugs

Created on 6 April 2020, over 4 years ago
Updated 8 August 2024, 4 months ago

FILE: /opt/lampp/htdocs/drupal/modules/marco_polo/marco_polo.api.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
19 | ERROR | Type hint "array" missing for $response
----------------------------------------------------------------------

FILE: ...pp/htdocs/drupal/modules/marco_polo/src/Controller/MarcoPoloController.php
--------------------------------------------------------------------------------
FOUND 9 ERRORS AND 2 WARNINGS AFFECTING 11 LINES
--------------------------------------------------------------------------------
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
29 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
30 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
31 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
32 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
96 | ERROR | [x] Blank lines are not allowed in a multi-line function
| | declaration
130 | ERROR | [x] Separate the @return and @throws sections by a blank line.
153 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: $submit_flag
163 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: $action
170 | ERROR | [ ] Parameter $submit_flag is not described in comment
179 | ERROR | [ ] Type hint "array" missing for $active_users
--------------------------------------------------------------------------------

FILE: /opt/lampp/htdocs/drupal/modules/marco_polo/marco_polo.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
42 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | 1000
--------------------------------------------------------------------------------

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇮🇳India riddhi.addweb

    I tried the #2 patch and it has been applied cleanly. But still, some errors are displayed:-

    FILE: /var/www/html/web/Drupal_9.5/web/modules/contrib/marco_polo/marco_polo.routing.yml
    -----------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------
     7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    -----------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/web/Drupal_9.5/web/modules/contrib/marco_polo/src/Controller/MarcoPoloController.php
    ----------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------
     11 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Cache\CacheBackendInterface.
     95 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ----------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /var/www/html/web/Drupal_9.5/web/modules/contrib/marco_polo/marco_polo.module
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormStateInterface.
    -----------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -----------------------------------------------------------------------------------------------------------------------------
  • First commit to issue fork.
  • Merge request !1Issue #3125196:fixed phpcs issues. → (Merged) created by Unnamed author
  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • 🇮🇳India riddhi.addweb

    I have applied MR !1 cleanly and it resolves all the errors.
    Please check the screenshot for the same.

    • 95ff7d30 committed on 8.x-1.x
      Issue #3125196:fixed phpcs issues.
      
  • 🇮🇳India atul_ghate

    Hi @vitalius2009,
    Thanks for merging the MR.

    I noticed that I wasn't credited for resolving this issue. Could you let me know if there's something I might have missed?

  • Status changed to Fixed 4 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024