Coding Standard Issues

Created on 26 September 2024, 3 months ago

Problem/Motivation

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

FILE: .../web/modules/custom/url_restriction_by_role/README.md
---------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------
54 | WARNING | Line exceeds 80 characters; contains 90 characters
---------------------------------------------------------------------------------------

FILE: .../web/modules/custom/url_restriction_by_role/src/EventSubscriber/UrlRestrictionByRole.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Symfony\Component\EventDispatcher\EventSubscriberInterface.
110 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket
111 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
112 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
113 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30
113 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------

Time: 122ms; Memory: 10MB

Steps to reproduce

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

1.1

Component

Code

Created by

šŸ‡µšŸ‡ŖPeru alyaj2a

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

Merge Requests

Comments & Activities

  • Issue created by @alyaj2a
  • Merge request !4Codign Standard issues - #3477139 ā†’ (Merged) created by alyaj2a
  • Pipeline finished with Failed
    3 months ago
    Total: 1723s
    #293708
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @alyaj2a,

    Thank you for providing an MR. I applied MR!4, it was applied smoothly and fixed most of the phpcs issues.

    This is the remaining issue after I ran phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml:

    āžœ  url_restriction_by_role git:(1.1.x) curl https://git.drupalcode.org/project/url_restriction_by_role/-/merge_requests/4.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2631    0  2631    0     0   6546      0 --:--:-- --:--:-- --:--:--  6544
    patching file README.md
    patching file src/EventSubscriber/UrlRestrictionByRole.php
    āžœ  url_restriction_by_role git:(1.1.x) āœ— ..
    āžœ  contrib git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml url_restriction_by_role
    
    FILE: /Users/interns/Demo-site/drupal_11_test/install-dir/drupal_11_test_site/web/modules/contrib/url_restriction_by_role/src/EventSubscriber/UrlRestrictionByRole.php
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
     114 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 229ms; Memory: 10MB
    
    āžœ  contrib git:(main) āœ—

    Thank you.

  • šŸ‡µšŸ‡­Philippines cleavinjosh
  • Pipeline finished with Failed
    3 months ago
    Total: 134s
    #297882
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi,

    Please review MR!4. Thank you.

  • Issue was unassigned.
  • Status changed to Needs review 23 days ago
  • First commit to issue fork.
  • Hi all!
    All phpcs issues are fixed, as well as the unit tests, so the pipeline is green.

    An updated version has been released.
    Thanks for all the contributions!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024