Fix the issues reported by phpcs

Created on 12 June 2023, over 1 year ago

Problem/Motivation

FILE: /var/www/html/vb/d_cont/custom_account_link/README.txt
-----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------
29 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
42 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------

FILE: .../www/html/vb/d_cont/custom_account_link/custom_account_link.links.menu.yml
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
13 | 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/custom_account_link/custom_account_link.routing.yml
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
7 | WARNING | The administration page callback should probably use "administer
| | site configuration" - which implies the user can change
| | something - rather than "access administration pages" which is
| | about viewing but not changing configurations.
--------------------------------------------------------------------------------

FILE: /var/www/html/vb/d_cont/custom_account_link/custom_account_link.module
----------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------

FILE: .../html/vb/d_cont/custom_account_link/src/Form/CustomAccountLinkSettings.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------------
38 | ERROR | [ ] The array declaration extends to column 84 (the limit is
| | 80). The array content should be split up over multiple
| | lines
39 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | )
48 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
49 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
50 | WARNING | [x] A comma should follow the last multiline array item. Found:
| | ]
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...ww/html/vb/d_cont/custom_account_link/src/Plugin/Menu/RegisterMenuLink.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
69 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------

Time: 65ms; 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 custom_account_link/

Proposed resolution

Fix all the errors and warnings for Drupal and DrupalPractice coding standards

Remaining tasks

Patch review

📌 Task
Status

Fixed

Version

2.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

Comments & Activities

Production build 0.71.5 2024