Fix the issues reported by phpcs

Created on 5 July 2023, about 1 year ago
Updated 19 July 2024, about 2 months ago

Problem/Motivation
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/cloudflare_sitemap-1.0.0-alpha3

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/cloudflare_sitemap-1.0.0-alpha3/cloudflare_sitemap/src/Commands/CachePurgerCommands.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Url.
48 | ERROR | [x] Additional blank lines found at end of doc comment
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------

FILE: /var/www/html/VB/drupal-10.1.0/modules/contrib/cloudflare_sitemap-1.0.0-alpha3/cloudflare_sitemap/src/CachePurger.php
---------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
55 | ERROR | [ ] Parameter $io is not described in comment
55 | ERROR | [ ] Parameter $t is not described in comment
141 | ERROR | [ ] Parameter $io is not described in comment
141 | ERROR | [ ] Parameter $t is not described in comment
170 | WARNING | [x] A comma should follow the last multiline array item. Found: )
---------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------

Steps to reproduce
Excute the command phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig /var/www/html/VB/drupal-10.1.0/modules/contrib/cloudflare_sitemap-1.0.0-alpha3

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India Indra patil Bangalore

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 @Indra patil
  • @indrapatil opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • šŸ‡®šŸ‡³India Indra patil Bangalore
  • šŸ‡®šŸ‡³India Indra patil Bangalore
  • Status changed to RTBC about 2 months ago
  • Hi @Indrapatil,

    The error you reported existed also on my end, the changes you made on MR !1 was applied successfully and it did fix the issue.

    cloudflare_sitemap git:(1.0.0-alpha3) curl https://git.drupalcode.org/project/cloudflare_sitemap/-/merge_requests/1.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2548    0  2548    0     0   6049      0 --:--:-- --:--:-- --:--:--  6214
    patching file src/CachePurger.php
    patching file src/Commands/CachePurgerCommands.php
    āžœ  cloudflare_sitemap git:(1.0.0-alpha3) āœ— cd ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig cloudflare_sitemap
    āžœ  contrib git:(master) āœ—

    Will now move this to RTBC

    Thanks,
    Jake

Production build 0.71.5 2024