Problem/Motivation
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/ct_expire/ct_expire.module
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 45 ERRORS AND 6 WARNINGS AFFECTING 42 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
13 | WARNING | [x] Unused use statement
15 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
21 | ERROR | [ ] Invalid function name, expected _y_ou_r_m_od_ul_e_node_update but found _YOUR_MODULE_node_update
21 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found "_YOUR_MODULE_node_update" but expected "ct_expire__YOUR_MODULE_node_update"
21 | ERROR | [x] Expected 1 blank line before function; 2 found
21 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
22 | ERROR | [x] There must not be a newline before the closing parenthesis of a single-line function declaration
23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
24 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Opening brace should be on the same line as the declaration
32 | WARNING | [x] 'TODO: Also create drush command for this.' should match the format '@todo Fix problem X here.'
32 | WARNING | [x] There must be no blank line following an inline comment
32 | WARNING | [ ] There must be no blank line following an inline comment
32 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
34 | WARNING | [x] Inline @var declarations should use the /** */ delimiters
34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
35 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
38 | WARNING | [x] 'TODO: Improve performance by bundling these actions.' should match the format '@todo Fix problem X here.'
38 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
39 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
40 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
41 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
42 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
51 | ERROR | [x] Opening brace should be on the same line as the declaration
52 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
53 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
54 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
56 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
58 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
59 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
61 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
62 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
63 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
64 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 24
65 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
65 | ERROR | [x] Expected newline after closing brace
66 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 24
67 | ERROR | [x] Line indented incorrectly; expected 12 spaces, found 24
68 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
70 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 20
71 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
73 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
74 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
75 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
80 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
81 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
82 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 48 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/ct_expire/README.md
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
--------------------------------------------------------------------------------------------
8 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
10 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
16 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
26 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/ct_expire/ct_expire.install
----------------------------------------------------------------------------------------------------
FOUND 26 ERRORS AFFECTING 22 LINES
----------------------------------------------------------------------------------------------------
17 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
21 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
22 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
23 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
23 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
24 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
25 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
28 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
29 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
30 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
30 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
31 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
32 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
35 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
36 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
36 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
37 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
38 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
41 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
42 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
42 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
43 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
44 | ERROR | [x] Array indentation error, expected 8 spaces but found 10
49 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
50 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
55 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 26 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/ct_expire/src/CtExpireScheduler.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 99 ERRORS AND 9 WARNINGS AFFECTING 82 LINES
------------------------------------------------------------------------------------------------------------------------------
10 | ERROR | [x] Function comment short description must start with exactly one space
10 | ERROR | [x] Doc comment short description must end with a full stop
13 | ERROR | [x] Opening brace should be on the same line as the declaration
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
27 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
34 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
36 | ERROR | [ ] Missing short description in doc comment
37 | ERROR | [ ] Missing parameter comment
38 | ERROR | [ ] Missing parameter comment
39 | ERROR | [ ] Missing parameter comment
41 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
42 | ERROR | [x] Opening brace should be on the same line as the declaration
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
46 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
48 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
48 | ERROR | [ ] Missing short description in doc comment
49 | ERROR | [ ] Missing parameter comment
50 | ERROR | [ ] Missing parameter comment
51 | ERROR | [ ] Missing parameter comment
53 | ERROR | [ ] Description for the @return value is missing
55 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
56 | ERROR | [x] Opening brace should be on the same line as the declaration
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
58 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
60 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
61 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
63 | WARNING | [x] 'TODO: Do not schedule if timestamp is in the past?' should match the format '@todo Fix problem X here.'
63 | WARNING | [x] There must be no blank line following an inline comment
63 | WARNING | [ ] There must be no blank line following an inline comment
63 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
65 | WARNING | [x] 'TODO: Validate tag?' should match the format '@todo Fix problem X here.'
65 | WARNING | [x] There must be no blank line following an inline comment
65 | WARNING | [ ] There must be no blank line following an inline comment
65 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
67 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
68 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
69 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
70 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
71 | ERROR | [x] Object operator not indented correctly; expected 18 spaces but found 33
74 | ERROR | [x] Array indentation error, expected 39 spaces but found 41
75 | ERROR | [x] Array indentation error, expected 39 spaces but found 41
76 | ERROR | [x] Array indentation error, expected 39 spaces but found 41
77 | ERROR | [x] Array indentation error, expected 39 spaces but found 41
80 | ERROR | [x] Object operator not indented correctly; expected 33 spaces but found 20
81 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
81 | ERROR | [x] Expected newline after closing brace
82 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
86 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 16
86 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
87 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
89 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
89 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
90 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
92 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
96 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
97 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
99 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
99 | ERROR | [ ] Missing short description in doc comment
100 | ERROR | [ ] Missing parameter comment
102 | ERROR | [ ] Description for the @return value is missing
104 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
105 | ERROR | [x] Opening brace should be on the same line as the declaration
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
106 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
106 | ERROR | [x] Comments may not appear after statements
107 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
107 | WARNING | [ ] Line exceeds 80 characters; contains 86 characters
107 | ERROR | [x] Comments may not appear after statements
108 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
109 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
109 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
109 | ERROR | [x] Comments may not appear after statements
110 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
110 | ERROR | [x] Expected 1 blank line after function; 2 found
113 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
113 | ERROR | [ ] Missing short description in doc comment
114 | ERROR | [ ] Description for the @return value is missing
116 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
117 | ERROR | [x] Opening brace should be on the same line as the declaration
118 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
122 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
124 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
124 | ERROR | [ ] Missing short description in doc comment
125 | ERROR | [ ] Missing parameter comment
127 | ERROR | [ ] Description for the @return value is missing
129 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
130 | ERROR | [x] Opening brace should be on the same line as the declaration
131 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
132 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
133 | ERROR | [x] Object operator not indented correctly; expected 14 spaces but found 29
135 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
135 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
136 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
136 | ERROR | [x] Expected newline after closing brace
137 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
141 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
141 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
142 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
143 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
145 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 86 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/ct_expire/src/Plugin/Field/FieldWidget/DateAndTimeCacheExpireWidget.php
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
24 | ERROR | [x] Opening brace should be on the same line as the declaration
------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------------
Steps to reproduce
Use the below command with arguments.
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/ct_expire
Proposed resolution
Fix the phpcs issue