Fix issues reported by phpcs

Created on 28 June 2023, about 1 year ago
Updated 3 July 2024, 3 months ago

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

FILE: gmail/src/Controller/CalbackController.php
----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Controller\ControllerBase.
73 | WARNING | [ ] Unused variable $referer.
88 | WARNING | [ ] Unused variable $content.
----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------

FILE: gmail/src/Form/GmailConfigForm.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\EmailValidatorInterface.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------

FILE: gmail/src/Plugin/Mail/GmailSystem.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Component\Utility\EmailValidatorInterface.
667 | WARNING | [ ] Unused variable $result.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal365365

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

  • Issue created by @vishal365365
  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishal365365

    issues fixed

  • Issue was unassigned.
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Status changed to Needs work 4 months ago
  • Hi @vishal365365,

    Applied your patch, it fixed some issues, however, found new issues, kindly see below.

    FILE: .../drupal-orgissue/web/modules/contrib/gmail/src/Plugin/Mail/GmailSystem.php
    --------------------------------------------------------------------------------
    FOUND 12 ERRORS AFFECTING 10 LINES
    --------------------------------------------------------------------------------
     127 | ERROR | [x] The first parameter of a multi-line function declaration
         |       |     must be on the line after the opening bracket
     128 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     129 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     130 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     131 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     132 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     133 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     134 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     135 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     136 | ERROR | [x] Multi-line function declaration not indented correctly;
         |       |     expected 4 spaces but found 30
     136 | ERROR | [x] Multi-line function declarations must have a trailing comma
         |       |     after the last parameter
     136 | ERROR | [x] The closing parenthesis of a multi-line function declaration
         |       |     must be on a new line
    --------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------
    
    Time: 895ms; Memory: 16MB

    Thank you.

  • First commit to issue fork.
  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • Hi @atul_ghate,

    Successfully applied MR !3, all issues are fixed.

     gmail git:(1.0.x) โœ— curl https://git.drupalcode.org/project/gmail/-/merge_requests/3.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  6211    0  6211    0     0  15540      0 --:--:-- --:--:-- --:--:-- 15925
    patching file src/Controller/CalbackController.php
    patching file src/Form/GmailConfigForm.php
    patching file src/Plugin/Mail/GmailSystem.php
    โžœ  gmail git:(1.0.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig gmail
    โžœ  contrib git:(main) โœ—
    

    Will move this to RTBC.

    Thanks,
    Jake

  • Pipeline finished with Skipped
    3 months ago
    #202759
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Jeya sundhar Coimbatore

    Jeya sundhar โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Fixed 3 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Jeya sundhar Coimbatore
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024