Fix the issues reported by phpcs

Created on 5 July 2023, 12 months ago
Updated 5 October 2023, 9 months ago

Problem/Motivation:

FILE: /var/www/html/vb/d_cont/pager_load_more/pager_load_more.module
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------
35 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
38 | ERROR | [x] Functions must not contain multiple empty lines in a row;
| | found 2 empty lines
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/pager_load_more/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
8 | WARNING | Line exceeds 80 characters; contains 148 characters
10 | WARNING | Line exceeds 80 characters; contains 81 characters
11 | WARNING | Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/pager_load_more/css/pager-load-more.css
-----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------
8 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

Time: 103ms; Memory: 10MB

Steps to reproduce:

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig pager_load_more/

Remaining tasks:

Patch review

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @urvashi_vora
  • 🇮🇳India Ashutosh Ahirwal India

    Reviewed provided patch and it get applied cleanly but still there are some error found by below provided command.

    ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/pager_load_more

    Remaining issue are

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/pager_load_more/js/pager-load-more.js
    --------------------------------------------------------------------------------------------------------------
    FOUND 66 ERRORS AFFECTING 23 LINES
    --------------------------------------------------------------------------------------------------------------
    11 | ERROR | [x] Expected 1 space after "*"; 0 found
    75 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    80 | ERROR | [x] Case breaking statements must be followed by a single blank line
    85 | ERROR | [x] Case breaking statements must be followed by a single blank line
    90 | ERROR | [x] Case breaking statements must be followed by a single blank line
    218 | ERROR | [x] Expected 1 space before "?"; 0 found
    218 | ERROR | [x] Expected 1 space after "?"; 0 found
    230 | ERROR | [x] Expected 1 space after "*"; 0 found
    272 | ERROR | [x] Expected 1 space before "-"; 0 found
    272 | ERROR | [x] Expected 1 space after "-"; 0 found
    272 | ERROR | [x] Expected 1 space before "-"; 0 found
    272 | ERROR | [x] Expected 1 space after "-"; 0 found
    272 | ERROR | [x] Expected 1 space before "-"; 0 found
    272 | ERROR | [x] Expected 1 space after "-"; 0 found
    272 | ERROR | [x] Expected 1 space before "-"; 0 found
    272 | ERROR | [x] Expected 1 space after "-"; 0 found
    283 | ERROR | [x] Expected 1 space before "-"; 0 found
    283 | ERROR | [x] Expected 1 space after "-"; 0 found
    283 | ERROR | [x] Expected 1 space before "-"; 0 found
    283 | ERROR | [x] Expected 1 space after "-"; 0 found
    283 | ERROR | [x] Expected 1 space before "-"; 0 found
    283 | ERROR | [x] Expected 1 space after "-"; 0 found
    283 | ERROR | [x] Expected 1 space before "-"; 0 found
    283 | ERROR | [x] Expected 1 space after "-"; 0 found
    305 | ERROR | [x] Inline control structures are not allowed
    313 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
    345 | ERROR | [x] Inline control structures are not allowed
    345 | ERROR | [x] Expected 1 space before "?"; 0 found
    345 | ERROR | [x] Expected 1 space after "?"; 0 found
    358 | ERROR | [x] Inline control structures are not allowed
    370 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    371 | ERROR | [x] Inline control structures are not allowed
    374 | ERROR | [x] Inline control structures are not allowed
    381 | ERROR | [x] Inline control structures are not allowed
    411 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
    465 | ERROR | [x] Expected 1 space after "<"; 0 found
    465 | ERROR | [x] Expected 1 space before "="; 0 found
    465 | ERROR | [x] Expected 1 space after "="; 0 found
    465 | ERROR | [x] Expected 1 space before "="; 0 found
    465 | ERROR | [x] Expected 1 space after "="; 0 found
    465 | ERROR | [x] Expected 1 space before ">"; 0 found
    467 | ERROR | [x] Expected 1 space after "<"; 0 found
    467 | ERROR | [x] Expected 1 space before "="; 0 found
    467 | ERROR | [x] Expected 1 space after "="; 0 found
    467 | ERROR | [x] Expected 1 space before ">"; 0 found
    467 | ERROR | [x] Expected 1 space after ">"; 0 found
    467 | ERROR | [x] Expected 1 space before "<"; 0 found
    467 | ERROR | [x] Expected 1 space after "<"; 0 found
    467 | ERROR | [x] Expected 1 space before "/"; 0 found
    467 | ERROR | [x] Expected 1 space after "/"; 0 found
    467 | ERROR | [x] Expected 1 space before ">"; 0 found
    468 | ERROR | [x] Expected 1 space after "<"; 0 found
    468 | ERROR | [x] Expected 1 space before "/"; 0 found
    468 | ERROR | [x] Expected 1 space after "/"; 0 found
    468 | ERROR | [x] Expected 1 space before ">"; 0 found
    469 | ERROR | [x] Expected 1 space after "<"; 0 found
    469 | ERROR | [x] Expected 1 space before "="; 0 found
    469 | ERROR | [x] Expected 1 space after "="; 0 found
    469 | ERROR | [x] Expected 1 space before ">"; 0 found
    469 | ERROR | [x] Expected 1 space after ">"; 0 found
    469 | ERROR | [x] Expected 1 space before "<"; 0 found
    469 | ERROR | [x] Expected 1 space after "<"; 0 found
    469 | ERROR | [x] Expected 1 space before "/"; 0 found
    469 | ERROR | [x] Expected 1 space after "/"; 0 found
    469 | ERROR | [x] Expected 1 space before ">"; 0 found
    479 | ERROR | [x] Inline control structures are not allowed
    --------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 66 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/pager_load_more/pager_load_more.module
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------------
    9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Routing\RouteMatchInterface.
    ---------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ---------------------------------------------------------------------------------------------------------------------------------

  • Assigned to Gautam_105@
  • @gautam_105 opened merge request.
  • Issue was unassigned.
  • 🇮🇳India Gautam_105@

    hi @urvashi_vora,
    I checked this issue after applying #2 patch but getting PHPCS isssue. After that i have fixed that issue and created MR for the same. Please review and see attached screenshot as well.

  • Status changed to RTBC 9 months ago
  • 🇮🇳India aayushDrupal

    Hi,

    I have reviewed Merge request !4 and it has fixed all the phpcs errors. I have attached a screenshot for reference.

    Moving status to RTBC.
    Thank you.

Production build 0.69.0 2024