Phpcs coding standard

Created on 11 March 2021, over 3 years ago
Updated 6 June 2024, 27 days ago
--------------------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------------------------------------------
 126 | ERROR | [x] Expected 1 blank line after function; 3 found
 129 | ERROR | [ ] More than 2 empty lines are not allowed
 130 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
 131 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
 132 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
 187 | ERROR | [x] Expected 1 space after IF keyword; 0 found
 187 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
 412 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------

Time: 367ms; Memory: 10MB
๐Ÿ› Bug report
Status

RTBC

Version

9.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Sahana _N

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

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 sidharth_soman Bangalore

    Patch doesn't apply anymore due to the updates on the branch. I'll upload a new one.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sidharth_soman Bangalore

    Attaching a screenshot for reference.

  • Issue was unassigned.
  • Status changed to Needs review 12 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sidharth_soman Bangalore

    New issues on 9.1.x were:

    
    C:\xampp\htdocs\backendassignment\web\modules\contrib>phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig rest_mail_login
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\rest_mail_login\README.md
    -------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    -------------------------------------------------------------------------------------
     5 | ERROR | [x] Expected 1 newline at end of file; 0 found
    -------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    -------------------------------------------------------------------------------------
    
    
    FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\rest_mail_login\src\Controller\RestMailLoginController.php
    ----------------------------------------------------------------------------------------------------------------------
    FOUND 8 ERRORS AFFECTING 6 LINES
    ----------------------------------------------------------------------------------------------------------------------
      1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
      1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
      2 | ERROR | [x] There must be one blank line after the namespace declaration
     29 | ERROR | [x] Expected 1 space after IF keyword; 0 found
     29 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
     34 | ERROR | [x] Expected one space after the comma, 0 found
     47 | ERROR | [x] Expected 1 blank line after function; 0 found
     48 | ERROR | [x] The closing brace for the class must have an empty line before it
    ----------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------------------------------------------------------
    
    Time: 594ms; Memory: 6MB
    
    

    I've fixed them and uploaded a patch.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !2resolve phpcs issues โ†’ (Open) created by Unnamed author
  • Status changed to RTBC 27 days ago
  • Hi @everyone,

    Applied the patch #5 and also applied the MR !2, both were applied successfully and confirmed both fixed all errors.

    Patch #5

    rest_mail_login git:(9.1.x) curl https://www.drupal.org/files/issues/2023-07-07/3203012-5.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1750  100  1750    0     0   7358      0 --:--:-- --:--:-- --:--:--  7882
    patching file README.md
    patching file src/Controller/RestMailLoginController.php
    โžœ  rest_mail_login git:(9.1.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig rest_mail_login
    โžœ  contrib git:(main) โœ—

    MR !2

    rest_mail_login git:(9.1.x) curl https://git.drupalcode.org/project/rest_mail_login/-/merge_requests/2.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1882    0  1882    0     0   3880      0 --:--:-- --:--:-- --:--:--  3987
    patching file README.md
    patching file src/Controller/RestMailLoginController.php
    โžœ  rest_mail_login git:(9.1.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig rest_mail_login
    โžœ  contrib git:(main) โœ—

    Will now move this to RTBC

    Thanks,
    Jake

Production build 0.69.0 2024