Phpcs Drupal coding standard issue

Created on 9 February 2023, over 1 year ago
Updated 28 March 2023, about 1 year ago

FILE: /var/www/html/contribution/web/modules/contrib/log_google_chat-3340464/log_google_chat.module
----------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 6 LINES
----------------------------------------------------------------------------------------------------------
20 | WARNING | [ ] Avoid backslash escaping in translatable strings when possible, use "" quotes instead
41 | WARNING | [ ] Unused global variable $base_root.
42 | WARNING | [ ] Unused variable $config.
50 | ERROR | [x] Concat operator must be surrounded by a single space
52 | ERROR | [x] Concat operator must be surrounded by a single space
54 | ERROR | [x] Expected 1 newline at end of file; 3 found
----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/log_google_chat-3340464/log_google_chat.info.yml
-----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------

FILE: /var/www/html/contribution/web/modules/contrib/log_google_chat-3340464/src/Logger/GoogleChatLogMessageFormatter.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 40 ERRORS AND 2 WARNINGS AFFECTING 31 LINES
-------------------------------------------------------------------------------------------------------------------------------
11 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
12 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
17 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
18 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
19 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
20 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
24 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
25 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
26 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
27 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
31 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
32 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
33 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
34 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
35 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
36 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
37 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
44 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
45 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
50 | ERROR | [x] There should be no white space after an opening "("
52 | ERROR | [x] Expected 1 space after IF keyword; 0 found
52 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
53 | ERROR | [x] Expected one space after the comma, 0 found
53 | ERROR | [x] Expected one space after the comma, 0 found
58 | ERROR | [x] Missing function doc comment
58 | ERROR | [ ] Public method name "GoogleChatLogMessageFormatter::send_to_google_chat" is not in lowerCamel format
58 | ERROR | [x] Expected 1 space before opening brace; found 0
72 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
73 | WARNING | [ ] Unused variable $result.
78 | ERROR | [x] Missing function doc comment
78 | ERROR | [ ] Public method name "GoogleChatLogMessageFormatter::format_message_with_theme" is not in lowerCamel format
78 | ERROR | [x] Expected one space after the comma, 0 found
78 | ERROR | [x] Expected one space after the comma, 0 found
78 | ERROR | [x] Expected 1 space before opening brace; found 0
86 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
91 | ERROR | [x] Each PHP statement must be on a line by itself
98 | ERROR | [x] Missing function doc comment
98 | ERROR | [ ] Public method name "GoogleChatLogMessageFormatter::is_content_allowed" is not in lowerCamel format
98 | ERROR | [x] Expected 1 space before opening brace; found 0
100 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
100 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
103 | ERROR | [x] Expected 1 newline at end of file; 3 found
-------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 37 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------

📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India himanshu_jhaloya Mandsaur

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

Comments & Activities

Production build 0.69.0 2024