Fix the issues reported by phpcs

Created on 27 June 2023, almost 2 years ago
Updated 6 June 2024, 10 months ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/tome_node/tome_node.info.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/tome_node/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------
1 | WARNING | Line exceeds 80 characters; contains 106 characters
6 | WARNING | Line exceeds 80 characters; contains 100 characters
11 | WARNING | Line exceeds 80 characters; contains 102 characters
12 | WARNING | Line exceeds 80 characters; contains 91 characters
13 | WARNING | Line exceeds 80 characters; contains 118 characters
14 | WARNING | Line exceeds 80 characters; contains 89 characters
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/tome_node/tome_node.services.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
8 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/tome_node/tome_node.module
--------------------------------------------------------------------------------
FOUND 7 ERRORS AND 3 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
8 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
8 | ERROR | [ ] Missing parameter comment
8 | ERROR | [ ] Missing parameter type
9 | WARNING | [ ] Hook implementations should not duplicate @param
| | documentation
9 | ERROR | [ ] Missing parameter comment
10 | WARNING | [ ] Hook implementations should not duplicate @return
| | documentation
10 | ERROR | [x] Separate the @param and @return sections by a blank line.
10 | ERROR | [ ] Description for the @return value is missing
17 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 200ms; Memory: 10MB

Steps to reproduce

Execute the command: phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig tome_node/

Remaining tasks

Patch review

šŸ“Œ Task
Status

RTBC

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India urvashi_vora Madhya Pradesh, India

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 @urvashi_vora
  • Assigned to imustakim
  • Assigned to arti_parmar
  • Status changed to Active almost 2 years ago
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • šŸ‡®šŸ‡³India arti_parmar

    Kindly review patch.

  • Status changed to Needs work 10 months ago
  • Hi @arti_parmar,

    Applied your patch successfully, however it threw an error.

    tome_node git:(1.0.x) curl https://www.drupal.org/files/issues/2023-06-28/3370581-4.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2882  100  2882    0     0  14612      0 --:--:-- --:--:-- --:--:-- 15748
    patching file README.md
    patching file tome_node.info.yml
    patching file tome_node.module
    patching file tome_node.services.yml
    āžœ  tome_node 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 tome_node
    
    FILE: /Users/PrometInterns/Demo-site/drupal-orgissue/web/modules/contrib/tome_node/src/Commands/StaticExportNodePathCommand.php
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ------------------------------------------------------------------------------------------------------------------------------------
     12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\tome_static\Commands\StaticCommand.
    ------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 273ms; Memory: 10MB

    Kindly check.

    Thanks,
    Jake

  • First commit to issue fork.
  • Status changed to Needs review 10 months ago
  • šŸ‡®šŸ‡³India manish-31

    Raised MR to fix all PHPCS issues. Needs review.

  • Status changed to RTBC 10 months ago
  • Hi @manish-31,

    Applied MR !2 successfully, confirmed all issues fixed.

    tome_node git:(1.0.x) curl https://git.drupalcode.org/project/tome_node/-/merge_requests/2.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  4005    0  4005    0     0  12730      0 --:--:-- --:--:-- --:--:-- 13350
    patching file README.md
    patching file src/Commands/StaticExportNodePathCommand.php
    patching file tome_node.info.yml
    patching file tome_node.module
    patching file tome_node.services.yml
    āžœ  tome_node 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 tome_node
    āžœ  contrib git:(main) āœ—

    Will now move this to RTBC

    Thanks,
    Jake

Production build 0.71.5 2024