Problem/Motivation
Fix the following issues from PHPCS.
FILE: ...htdocs/d9/web/modules/contrib/last_visited_pages/last_visited_pages.module
--------------------------------------------------------------------------------
FOUND 19 ERRORS AFFECTING 11 LINES
--------------------------------------------------------------------------------
4 | ERROR | [x] The second line in the file doc comment must be "@file"
15 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
16 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
16 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
17 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
17 | ERROR | [x] Case breaking statement indented incorrectly; expected 4
| | spaces, found 2
19 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
19 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
20 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
20 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 2
21 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
21 | ERROR | [x] Case breaking statement indented incorrectly; expected 4
| | spaces, found 2
22 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
22 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
28 | ERROR | [ ] last_visited_pages_uninstall() is an installation hook and
| | must be declared in an install file
29 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
29 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
30 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 18 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...tdocs/d9/web/modules/contrib/last_visited_pages/last_visited_pages.install
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
49 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...dules/contrib/last_visited_pages/src/Form/LastVisitedPagesSettingsForm.php
--------------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 7 LINES
--------------------------------------------------------------------------------
21 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
32 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
33 | ERROR | [x] Expected 3 space(s) before asterisk; 2 found
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
45 | ERROR | [x] Expected one space after the comma, 0 found
45 | ERROR | [x] Expected one space after the comma, 0 found
68 | ERROR | [x] Expected 1 blank line after function; 0 found
69 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: .../web/modules/contrib/last_visited_pages/src/LastVisitedPagesSubscriber.php
--------------------------------------------------------------------------------
FOUND 30 ERRORS AFFECTING 22 LINES
--------------------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should not begin
| | with a file doc comment
30 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
31 | ERROR | [x] Short array syntax must be used to define arrays
36 | ERROR | [x] Expected 1 space after IF keyword; 0 found
38 | ERROR | [x] Expected newline after closing brace
42 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
43 | ERROR | [x] Expected 1 space after IF keyword; 0 found
49 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
49 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but
| | found 6
55 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
55 | ERROR | [x] Short array syntax must be used to define arrays
61 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
64 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
64 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but
| | found 6
64 | ERROR | [x] Short array syntax must be used to define arrays
65 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
66 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
67 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
70 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
70 | ERROR | [x] Object operator not indented correctly; expected 8 spaces but
| | found 6
71 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 6
73 | ERROR | [x] Expected 1 space after IF keyword; 0 found
75 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 8
75 | ERROR | [x] Object operator not indented correctly; expected 10 spaces
| | but found 8
76 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 8
85 | ERROR | [x] Visibility must be declared on method "getSubscribedEvents"
85 | ERROR | [x] Expected 1 space before opening brace; found 0
86 | ERROR | [x] Short array syntax must be used to define arrays
89 | ERROR | [x] Expected 1 newline at end of file; 0 found
89 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 30 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------
FILE: ...ules/contrib/last_visited_pages/src/Plugin/Block/LastVisitedPagesBlock.php
--------------------------------------------------------------------------------
FOUND 120 ERRORS AFFECTING 83 LINES
--------------------------------------------------------------------------------
20 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
23 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
23 | ERROR | [x] Expected 1 blank line before function; 2 found
24 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
25 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
26 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
28 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
31 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
32 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
34 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
36 | ERROR | [x] Expected 1 space after "??"; 0 found
38 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
38 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
39 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
40 | ERROR | [x] Object operator not indented correctly; expected 8 spaces
| | but found 6
40 | ERROR | [x] Short array syntax must be used to define arrays
45 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
46 | ERROR | [x] Object operator not indented correctly; expected 8 spaces
| | but found 6
49 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
49 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but
| | found "false"
51 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
51 | ERROR | [x] Expected 1 space after IF keyword; 0 found
52 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
52 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
53 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
53 | ERROR | [x] Expected 1 space after "??"; 0 found
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
56 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
56 | ERROR | [x] Inline comments must end in full-stops, exclamation marks,
| | question marks, colons, or closing parentheses
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
57 | ERROR | [x] Comments may not appear after statements
59 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
59 | ERROR | [x] Expected 1 space after IF keyword; 0 found
60 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
61 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
61 | ERROR | [x] Short array syntax must be used to define arrays
63 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
63 | ERROR | [x] Expected 1 space after IF keyword; 0 found
64 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
65 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
67 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
67 | ERROR | [x] Expected 1 space after IF keyword; 0 found
68 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
68 | ERROR | [x] Expected one space after the comma, 0 found
70 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
70 | ERROR | [x] Expected newline after closing brace
71 | ERROR | [x] Line indented incorrectly; expected 10 spaces, found 14
73 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
74 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
76 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
78 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
79 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
81 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
81 | ERROR | [x] Expected 1 space after IF keyword; 0 found
82 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 12
82 | ERROR | [ ] Concatenating translatable strings is not allowed, use
| | placeholders instead and only one string literal
82 | ERROR | [x] Concat operator must be surrounded by a single space
82 | ERROR | [x] Concat operator must be surrounded by a single space
83 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
85 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 10
86 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
87 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 8
87 | ERROR | [x] Short array syntax must be used to define arrays
88 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
88 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found
| | 6
90 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
93 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
94 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
96 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
97 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
98 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
98 | ERROR | [x] Use null coalesce operator instead of ternary operator.
100 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
100 | ERROR | [x] Expected 1 space before "??"; 0 found
100 | ERROR | [x] Expected 1 space after "??"; 0 found
100 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but
| | found "true"
102 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
103 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
103 | ERROR | [x] Short array syntax must be used to define arrays
107 | ERROR | [x] Expected one space after the comma, 0 found
107 | ERROR | [x] Expected one space after the comma, 0 found
110 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
112 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
113 | ERROR | [x] Object operator not indented correctly; expected 8 spaces
| | but found 6
116 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
117 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
117 | ERROR | [ ] The array declaration extends to column 183 (the limit is
| | 80). The array content should be split up over multiple
| | lines
118 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
120 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
122 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
126 | ERROR | [x] Expected 1 space after "=>"; 2 found
126 | ERROR | [x] Expected 1 space before "??"; 0 found
126 | ERROR | [x] Expected 1 space after "??"; 0 found
129 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
133 | ERROR | [x] Expected 1 space after "=>"; 2 found
133 | ERROR | [x] Expected 1 space before "??"; 0 found
133 | ERROR | [x] Expected 1 space after "??"; 0 found
136 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
140 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
141 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
143 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
146 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
147 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
148 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
149 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
150 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
151 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
153 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
156 | ERROR | [x] Doc comment long description must start with a capital
| | letter
158 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
159 | ERROR | [x] Opening brace should be on the same line as the declaration
160 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
161 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
161 | ERROR | [x] Expected 1 blank line after function; 0 found
162 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
162 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
162 | ERROR | [x] Closing brace indented incorrectly; expected 0 spaces, found
| | 2
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 118 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------