Drupal Coding Standard Issue

Created on 22 August 2022, over 2 years ago
Updated 25 April 2023, over 1 year ago

$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml user_activity_log/
Xdebug: [Step Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(

FILE: C:\Users\SI-001\Downloads\user_activity_log\src\Controller\UserallActivityController.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AND 1 WARNING AFFECTING 22 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
50 | ERROR | [x] Whitespace found at end of line
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
66 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 2
68 | ERROR | [x] No space found before comment text; expected "// Add the pager." but found "//Add the pager."
71 | ERROR | [x] Expected 1 blank line after function; 2 found
72 | ERROR | [x] Whitespace found at end of line
87 | ERROR | [x] Whitespace found at end of line
89 | ERROR | [x] Short array syntax must be used to define arrays
91 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
94 | ERROR | [x] Inline comments must start with a capital letter
95 | ERROR | [x] Expected 1 space after "=>"; 0 found
95 | ERROR | [x] Expected 1 space after "=>"; 0 found
98 | ERROR | [x] Whitespace found at end of line
105 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 2
107 | ERROR | [x] No space found before comment text; expected "// Add the pager." but found "//Add the pager."
112 | ERROR | [x] Expected 1 newline at end of file; 2 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\user_activity_log\src\Plugin\Block\UserActivityBlock.php
----------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------------------------
22 | ERROR | [ ] Missing member variable doc comment
23 | ERROR | [ ] Missing member variable doc comment
23 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
23 | ERROR | [x] Whitespace found at end of line
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
71 | ERROR | [x] Whitespace found at end of line
77 | ERROR | [x] Spaces must be used for alignment; tabs are not allowed
77 | ERROR | [x] Whitespace found at end of line
79 | ERROR | [x] Whitespace found at end of line
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------

FILE: C:\Users\SI-001\Downloads\user_activity_log\user_activity_log.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: C:\Users\SI-001\Downloads\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: C:\Users\SI-001\Downloads\user_activity_log\user_activity_log.routing.yml
-------------------------------------------------------------------------------
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
-------------------------------------------------------------------------------

Time: 307ms; Memory: 10MB

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India Rakhi Soni

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024