Fix coding standard issue | PHPCS

Created on 10 February 2023, almost 2 years ago
Updated 25 April 2023, over 1 year ago

Problem/Motivation

------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
15 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------

FILE: //web/modules/contrib/user_activity_log/user_activity_log.module
-------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-------------------------------------------------------------------------------------------------
3 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 1
6 | ERROR | [x] There must be exactly one blank line after the file comment
7 | ERROR | [x] Missing function doc comment
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

FILE: //modules/contrib/user_activity_log/src/Plugin/Block/UserActivityBlock.php
---------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------
22 | ERROR | [ ] Missing member variable doc comment
23 | ERROR | [ ] Missing member variable doc comment
61 | ERROR | [x] Expected 0 spaces between argument "$connection" and comma; 1 found
68 | ERROR | [ ] Doc comment short description must start with a capital letter
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------

FILE: web/modules/contrib/user_activity_log/src/Controller/UserallActivityController.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 21 ERRORS AND 1 WARNING AFFECTING 18 LINES
-------------------------------------------------------------------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
16 | ERROR | [x] Scope keyword "protected" must be followed by a single space; found 2
16 | ERROR | [ ] Missing member variable doc comment
17 | ERROR | [ ] Missing member variable doc comment
22 | ERROR | [x] Scope keyword "public" must be followed by a single space; found 2
22 | ERROR | [x] Expected 0 spaces between argument "$connection" and comma; 1 found
31 | ERROR | [x] Space before opening parenthesis of function call prohibited
52 | ERROR | [x] Short array syntax must be used to define arrays
55 | ERROR | [x] Inline comments must start with a capital letter
56 | ERROR | [x] Expected 1 space after "=>"; 0 found
56 | ERROR | [x] Expected 1 space after "=>"; 0 found
67 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 2
69 | ERROR | [x] No space found before comment text; expected "// Add the pager." but found "//Add the pager."
72 | ERROR | [x] Expected 1 blank line after function; 2 found
90 | ERROR | [x] Short array syntax must be used to define arrays
92 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
95 | ERROR | [x] Inline comments must start with a capital letter
96 | ERROR | [x] Expected 1 space after "=>"; 0 found
96 | ERROR | [x] Expected 1 space after "=>"; 0 found
107 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 2
109 | ERROR | [x] No space found before comment text; expected "// Add the pager." but found "//Add the pager."
114 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 20 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Sahana _N

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

Comments & Activities

Production build 0.71.5 2024