Problem/Motivation
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\oauth2_client.api.php
------------------------------------------------------------------------------------------------------------------------
FOUND 11 ERRORS AFFECTING 9 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
57 | ERROR | [ ] @return doc comment specified, but function has no return statement
60 | ERROR | [x] Return comment indentation must be 3 spaces, found 1 spaces
65 | ERROR | [x] No space found before comment text; expected "// Returns an OAuth2\Client object" but found
| | "//Returns an OAuth2\Client object"
65 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
94 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
95 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
100 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
109 | ERROR | [x] Parameter comment must end with a full stop
111 | ERROR | [ ] Type hint "array" missing for $redirect
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\oauth2_client.install
-----------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
5 | ERROR | [x] Expected 1 newline at end of file; 2 found
-----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\oauth2_client.module
-----------------------------------------------------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 12 LINES
-----------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
45 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
56 | WARNING | [ ] Open page callback found, please add a comment before the line why there is no access restriction
78 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
107 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
108 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 2 spaces
113 | ERROR | [x] Parameter comment indentation must be 3 spaces, found 1 spaces
122 | ERROR | [x] Parameter comment must end with a full stop
124 | ERROR | [ ] Type hint "array" missing for $redirect
125 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
152 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
159 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced with use statements
-----------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\README.txt
------------------------------------------------------------------------------------------------------------------------
FOUND 79 ERRORS AFFECTING 69 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
1 | ERROR | [ ] An error occurred during processing; checking has been aborted. The error message was: Cannot parse
| | for loop at position 304
99 | ERROR | [x] Missing class doc comment
100 | ERROR | [x] Missing function doc comment
100 | ERROR | [x] Expected 1 blank line before function; 0 found
102 | ERROR | [x] Expected 1 blank line after function; 0 found
103 | ERROR | [x] The closing brace for the class must have an empty line before it
104 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
104 | ERROR | [x] Perl-style comments are not allowed; use "// Comment" instead
106 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
106 | ERROR | [x] PHP keywords must be lowercase; expected "and" but found "And"
107 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
107 | ERROR | [x] Perl-style comments are not allowed; use "// Comment" instead
109 | ERROR | [ ] Namespaced classes/interfaces/traits should be referenced with use statements
115 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
115 | ERROR | [x] Perl-style comments are not allowed; use "// Comment" instead
117 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
119 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
119 | ERROR | [x] Space before opening parenthesis of function call prohibited
120 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
121 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
121 | ERROR | [x] Concat operator must be surrounded by a single space
121 | ERROR | [x] Expected 1 space after FOR keyword; newline found
121 | ERROR | [x] Inline control structures are not allowed
122 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
123 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
124 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
125 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
127 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
128 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
129 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
130 | ERROR | [x] Line indented incorrectly; expected at least 4 spaces, found 2
131 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
133 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
134 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
136 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
137 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
138 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
139 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
140 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
141 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
143 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
144 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
145 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
146 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
148 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 0
150 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
151 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
152 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
154 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
155 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
156 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
157 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
158 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
159 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
160 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
161 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
162 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
163 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
165 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
166 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
167 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
168 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
170 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
171 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
172 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
173 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
174 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
175 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
176 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
178 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
179 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
180 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
181 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
188 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
189 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
190 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
191 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
192 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 2
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 77 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\src\Client.php
------------------------------------------------------------------------------------------------------------------------
FOUND 30 ERRORS AND 7 WARNINGS AFFECTING 37 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
50 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate
| | paragraph
75 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
76 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
77 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
78 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
79 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
80 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
81 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
86 | ERROR | [x] Visibility must be declared on method "token"
127 | ERROR | [ ] Missing parameter type
139 | ERROR | [ ] Missing parameter type
141 | ERROR | [x] Separate the @param and @return sections by a blank line.
171 | ERROR | [ ] Missing parameter type
214 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
215 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
216 | ERROR | [x] Array closing indentation error, expected 10 spaces but found 19
221 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
222 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
223 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
224 | ERROR | [x] Array indentation error, expected 12 spaces but found 21
225 | ERROR | [x] Array closing indentation error, expected 10 spaces but found 19
239 | WARNING | [ ] Exceptions should not be translated
266 | WARNING | [ ] Exceptions should not be translated
269 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
270 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
271 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
296 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
342 | WARNING | [ ] Exceptions should not be translated
347 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
348 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
349 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
350 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
351 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
411 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
412 | WARNING | [ ] Line exceeds 80 characters; contains 87 characters
463 | WARNING | [ ] Exceptions should not be translated
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 26 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\tests\oauth2_client.test
------------------------------------------------------------------------------------------------------------------------
FOUND 26 ERRORS AND 3 WARNINGS AFFECTING 18 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
12 | ERROR | [ ] Missing member variable doc comment
14 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Missing function doc comment
26 | ERROR | [x] Missing function doc comment
42 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
42 | ERROR | [x] Expected one space after the comma, 2 found
54 | ERROR | [x] Inline comments must start with a capital letter
54 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
54 | ERROR | [x] Comments may not appear after statements
67 | ERROR | [x] Inline comments must start with a capital letter
67 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
67 | ERROR | [x] Comments may not appear after statements
71 | ERROR | [x] Inline comments must start with a capital letter
71 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
71 | ERROR | [x] Comments may not appear after statements
72 | WARNING | [ ] Unused variable $token4.
88 | ERROR | [x] Inline comments must start with a capital letter
88 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
88 | ERROR | [x] Comments may not appear after statements
92 | ERROR | [x] Inline comments must start with a capital letter
92 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
92 | ERROR | [x] Comments may not appear after statements
93 | WARNING | [ ] Unused variable $token4.
100 | WARNING | [ ] Unused variable $result.
122 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
127 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
128 | ERROR | [x] Expected 1 blank line after function; 0 found
129 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\tests\oauth2_client_test.install
------------------------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AFFECTING 9 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
22 | ERROR | [x] No space found before comment text; expected "// _oauth2_client_test_revoke_permissions();" but
| | found "//_oauth2_client_test_revoke_permissions();"
86 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
87 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
88 | ERROR | [x] Array indentation error, expected 4 spaces but found 6
89 | ERROR | [x] Array closing indentation error, expected 2 spaces but found 4
146 | ERROR | [x] Missing function doc comment
154 | ERROR | [x] Missing function doc comment
160 | ERROR | [x] Expected 1 newline at end of file; 0 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\oauth2_client\tests\oauth2_client_test.module
------------------------------------------------------------------------------------------------------------------------
FOUND 25 ERRORS AND 6 WARNINGS AFFECTING 23 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] The PHP open tag must be followed by exactly one blank line
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
10 | ERROR | [x] Doc comment long description must end with a full stop
13 | ERROR | [x] Missing function doc comment
13 | ERROR | [x] Expected 1 blank line before function; 0 found
13 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$comment"; expected 1 but
| | found 0
15 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
55 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
55 | ERROR | [x] Expected one space after the comma, 2 found
66 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
66 | ERROR | [x] Expected one space after the comma, 2 found
70 | WARNING | [x] There must be no blank line following an inline comment
70 | WARNING | [ ] There must be no blank line following an inline comment
120 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
120 | ERROR | [x] Expected one space after the comma, 2 found
126 | ERROR | [x] Expected 1 space after comma in argument list; 2 found
126 | ERROR | [x] Expected one space after the comma, 2 found
139 | WARNING | [ ] Open page callback found, please add a comment before the line why there is no access restriction
144 | WARNING | [ ] Open page callback found, please add a comment before the line why there is no access restriction
149 | WARNING | [ ] Open page callback found, please add a comment before the line why there is no access restriction
171 | ERROR | [x] Doc comment long description must end with a full stop
191 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate
| | paragraph
194 | ERROR | [x] Doc comment long description must end with a full stop
202 | WARNING | [x] A comma should follow the last multiline array item. Found: )
222 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate
| | paragraph
235 | ERROR | [x] Array indentation error, expected 6 spaces but found 14
236 | ERROR | [x] Array indentation error, expected 6 spaces but found 14
237 | ERROR | [x] Array indentation error, expected 6 spaces but found 14
238 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 12
244 | ERROR | [x] Array indentation error, expected 6 spaces but found 17
247 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 25 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
Time: 2.44 secs; Memory: 6MB
Steps to reproduce
Run the phpcs command on the module
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes