Fixing the coding standard issues | phpcs

Created on 3 April 2023, almost 2 years ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\captcha_after-3351784\captcha_after.admin.inc
---------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
66 | ERROR | [ ] Return type missing for @return tag in function comment
---------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\captcha_after-3351784\captcha_after.install
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 2 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
3 | ERROR | [ ] Missing short description in doc comment
8 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
| | "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
10 | ERROR | [ ] Empty installation hooks are not necessary
14 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
| | "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\captcha_after-3351784\captcha_after.module
------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
6 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate
| | paragraph
10 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
| | "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
30 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",,
| | "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
47 | WARNING | [x] 'TODO - this check is OK for now but it is very restrictive, because you can' should match the
| | format '@todo Fix problem X here.'
153 | ERROR | [ ] Return type missing for @return tag in function comment
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\captcha_after-3351784\captcha_after.test
----------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 6 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
15 | ERROR | [ ] Missing @var tag in member variable comment
16 | ERROR | [ ] There must not be more than one property declared per statement
16 | ERROR | [ ] Class property $test_user should use lowerCamel naming without underscores
16 | ERROR | [ ] Missing member variable doc comment
16 | ERROR | [ ] Class property $test_user1 should use lowerCamel naming without underscores
19 | ERROR | [x] Doc comment short description must start with a capital letter
30 | ERROR | [x] Doc comment short description must start with a capital letter
108 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
145 | ERROR | [x] Whitespace found at end of line
146 | WARNING | [ ] Line exceeds 80 characters; contains 97 characters
148 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
148 | ERROR | [x] Comments may not appear after statements
152 | ERROR | [x] Whitespace found at end of line
183 | WARNING | [ ] Line exceeds 80 characters; contains 148 characters
183 | ERROR | [x] Comments may not appear after statements
184 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
184 | WARNING | [ ] There must be no blank line following an inline comment
184 | ERROR | [x] Comments may not appear after statements
205 | ERROR | [x] Whitespace found at end of line
220 | ERROR | [x] Whitespace found at end of line
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------

Time: 959ms; Memory: 6MB

Steps to reproduce

Run the codesniffer command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024