Fix the issues reported by phpcs

Created on 22 March 2024, 3 months ago
Updated 24 April 2024, 2 months ago

Problem/Motivation

There is a files need to fixed with coding standards.
Here is the command : -
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml web/modules/contrib/variationcache/
Result :-

FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/variationcache.module
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 14 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/variationcache.info.yml
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/README.md
----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------------------
 3 | WARNING | Line exceeds 80 characters; contains 118 characters
 4 | WARNING | Line exceeds 80 characters; contains 118 characters
----------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/src/Cache/VariationCacheInterface.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/src/Cache/CacheRedirect.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/src/Cache/VariationCacheFactory.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/src/Cache/VariationCache.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------


FILE: /home/chandansha/docker/testd10/web/modules/contrib/variationcache/src/Cache/VariationCacheFactoryInterface.php
----------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
 10 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate paragraph
----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------

Time: 147ms; Memory: 10MB

Steps to reproduce

Run PHPCS on VariationCache module.

Proposed resolution

Fixed the coding standards.

Remaining tasks

Submit the patch either MR .

📌 Task
Status

RTBC

Version

1.5

Component

Documentation

Created by

🇮🇳India Chandansha

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 @Chandansha
  • 🇮🇳India Chandansha

    fixed all issue. But still there are some issues left.
    Please have a look

    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/variationcache.module
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     19 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/src/Cache/VariationCacheInterface.php
    --------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------------------------------------------
     15 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    --------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/src/Cache/CacheRedirect.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     15 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/src/Cache/VariationCacheFactory.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     15 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/src/Cache/VariationCache.php
    ------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------
     15 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/chandansha/docker/testd10/web/modules/issue/variationcache-3432902/src/Cache/VariationCacheFactoryInterface.php
    ---------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ---------------------------------------------------------------------------------------------------------------------------
     15 | ERROR | Doc comment short description must be on a single line, further text should be a separate paragraph
    ---------------------------------------------------------------------------------------------------------------------------
    
    Time: 116ms; Memory: 10MB
    
  • Status changed to Needs review 3 months ago
  • Status changed to RTBC 2 months ago
  • 🇵🇭Philippines paraderojether

    Hi

    I reviewed MR!3, applied against VariationCache 8.x-1.5 and confirmed the patch is applied cleanly and it fixes the issues reported by phpcs.

    jetherparadero@PrometSources-MacBook-Pro-3 variationcache % curl https://git.drupalcode.org/project/variationcache/-/merge_requests/3.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  6710    0  6710    0     0   6932      0 --:--:-- --:--:-- --:--:--  6982
    patching file README.md
    patching file 'src/Cache/CacheRedirect.php'
    patching file 'src/Cache/VariationCache.php'
    patching file 'src/Cache/VariationCacheFactory.php'
    patching file 'src/Cache/VariationCacheFactoryInterface.php'
    patching file 'src/Cache/VariationCacheInterface.php'
    patching file variationcache.module
    jetherparadero@PrometSources-MacBook-Pro-3 variationcache % cd ..
    jetherparadero@PrometSources-MacBook-Pro-3 contrib % phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml variationcache
    jetherparadero@PrometSources-MacBook-Pro-3 contrib %

    +1 RTBC
    Thank you.

Production build 0.69.0 2024