Skip to content

Commit 16a606a

Browse files
committed
chore: update phpstan baseline
1 parent 80005b2 commit 16a606a

File tree

4 files changed

+4
-250
lines changed

4 files changed

+4
-250
lines changed

system/Boot.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,8 @@ protected static function initializeConsole(): Console
373373
$console = new Console();
374374

375375
// Show basic information before we do anything else.
376-
// @phpstan-ignore-next-line
377376
if (is_int($suppress = array_search('--no-header', $_SERVER['argv'], true))) {
378-
unset($_SERVER['argv'][$suppress]); // @phpstan-ignore-line
377+
unset($_SERVER['argv'][$suppress]);
379378
$suppress = true;
380379
}
381380

utils/phpstan-baseline/codeigniter.superglobalAccess.neon

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 79 errors
1+
# total 77 errors
22

33
parameters:
44
ignoreErrors:
@@ -12,11 +12,6 @@ parameters:
1212
count: 1
1313
path: ../../system/CLI/CLI.php
1414

15-
-
16-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
17-
count: 1
18-
path: ../../system/CLI/CLI.php
19-
2015
-
2116
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
2217
count: 1
@@ -152,11 +147,6 @@ parameters:
152147
count: 1
153148
path: ../../tests/system/CLI/ConsoleTest.php
154149

155-
-
156-
message: '#^Accessing offset ''argv'' directly on \$_SERVER is discouraged\.$#'
157-
count: 1
158-
path: ../../tests/system/CLI/ConsoleTest.php
159-
160150
-
161151
message: '#^Accessing offset ''encryption\.key'' directly on \$_SERVER is discouraged\.$#'
162152
count: 1

utils/phpstan-baseline/codeigniter.superglobalAccessAssign.neon

Lines changed: 1 addition & 236 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 581 errors
1+
# total 466 errors
22

33
parameters:
44
ignoreErrors:
@@ -17,46 +17,11 @@ parameters:
1717
count: 3
1818
path: ../../system/HTTP/IncomingRequest.php
1919

20-
-
21-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
22-
count: 1
23-
path: ../../tests/system/CLI/CLITest.php
24-
25-
-
26-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''\-\-parm'', ''pvalue'', ''d'', ''\-\-p2'', ''\-\-p3'', ''value 3''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
27-
count: 1
28-
path: ../../tests/system/CLI/CLITest.php
29-
30-
-
31-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''\-\-parm'', ''pvalue'', ''d''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
32-
count: 1
33-
path: ../../tests/system/CLI/CLITest.php
34-
35-
-
36-
message: '#^Assigning array\{''ignored'', ''b'', ''c'', ''d'', ''\-\-parm'', ''pvalue'', ''d2'', ''da\-sh'', ''\-\-fix'', ''\-\-opt\-in'', ''sure''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
37-
count: 1
38-
path: ../../tests/system/CLI/CLITest.php
39-
40-
-
41-
message: '#^Assigning array\{''ignored'', ''b'', ''c''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
42-
count: 1
43-
path: ../../tests/system/CLI/CLITest.php
44-
4520
-
4621
message: '#^Assigning ''http\://example\.com/'' directly on offset ''app\.baseURL'' of \$_SERVER is discouraged\.$#'
4722
count: 1
4823
path: ../../tests/system/CLI/ConsoleTest.php
4924

50-
-
51-
message: '#^Assigning int\<1, max\> directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
52-
count: 1
53-
path: ../../tests/system/CLI/ConsoleTest.php
54-
55-
-
56-
message: '#^Assigning non\-empty\-array\<int\|string, string\> directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
57-
count: 1
58-
path: ../../tests/system/CLI/ConsoleTest.php
59-
6025
-
6126
message: '#^Assigning ''/index\.php'' directly on offset ''SCRIPT_NAME'' of \$_SERVER is discouraged\.$#'
6227
count: 1
@@ -67,11 +32,6 @@ parameters:
6732
count: 1
6833
path: ../../tests/system/Cache/ResponseCacheTest.php
6934

70-
-
71-
message: '#^Assigning non\-empty\-list\<string\> directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
72-
count: 1
73-
path: ../../tests/system/Cache/ResponseCacheTest.php
74-
7535
-
7636
message: '#^Assigning non\-falsy\-string directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
7737
count: 1
@@ -152,46 +112,6 @@ parameters:
152112
count: 1
153113
path: ../../tests/system/CodeIgniterTest.php
154114

155-
-
156-
message: '#^Assigning 1 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
157-
count: 5
158-
path: ../../tests/system/CodeIgniterTest.php
159-
160-
-
161-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
162-
count: 26
163-
path: ../../tests/system/CodeIgniterTest.php
164-
165-
-
166-
message: '#^Assigning array\{''index\.php'', ''/''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
167-
count: 11
168-
path: ../../tests/system/CodeIgniterTest.php
169-
170-
-
171-
message: '#^Assigning array\{''index\.php'', ''cli''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
172-
count: 1
173-
path: ../../tests/system/CodeIgniterTest.php
174-
175-
-
176-
message: '#^Assigning array\{''index\.php'', ''example''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
177-
count: 6
178-
path: ../../tests/system/CodeIgniterTest.php
179-
180-
-
181-
message: '#^Assigning array\{''index\.php'', ''image''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
182-
count: 1
183-
path: ../../tests/system/CodeIgniterTest.php
184-
185-
-
186-
message: '#^Assigning array\{''index\.php'', ''pages/about''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
187-
count: 7
188-
path: ../../tests/system/CodeIgniterTest.php
189-
190-
-
191-
message: '#^Assigning array\{''index\.php''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
192-
count: 5
193-
path: ../../tests/system/CodeIgniterTest.php
194-
195115
-
196116
message: '#^Assigning non\-falsy\-string directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
197117
count: 1
@@ -242,16 +162,6 @@ parameters:
242162
count: 38
243163
path: ../../tests/system/Filters/FiltersTest.php
244164

245-
-
246-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
247-
count: 1
248-
path: ../../tests/system/Filters/FiltersTest.php
249-
250-
-
251-
message: '#^Assigning array\{''spark'', ''list''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
252-
count: 1
253-
path: ../../tests/system/Filters/FiltersTest.php
254-
255165
-
256166
message: '#^Assigning ''POST'' directly on offset ''REQUEST_METHOD'' of \$_SERVER is discouraged\.$#'
257167
count: 1
@@ -267,56 +177,6 @@ parameters:
267177
count: 1
268178
path: ../../tests/system/HTTP/CLIRequestTest.php
269179

270-
-
271-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''abc \< def'', ''McDonald\\''s'', ''\<s\>aaa\</s\>''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
272-
count: 1
273-
path: ../../tests/system/HTTP/CLIRequestTest.php
274-
275-
-
276-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''pro\-file'', ''\-\-foo'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
277-
count: 1
278-
path: ../../tests/system/HTTP/CLIRequestTest.php
279-
280-
-
281-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
282-
count: 1
283-
path: ../../tests/system/HTTP/CLIRequestTest.php
284-
285-
-
286-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar'', ''\-\-foo\-bar'', ''yes''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
287-
count: 1
288-
path: ../../tests/system/HTTP/CLIRequestTest.php
289-
290-
-
291-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''bar''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
292-
count: 2
293-
path: ../../tests/system/HTTP/CLIRequestTest.php
294-
295-
-
296-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''oops'', ''bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
297-
count: 1
298-
path: ../../tests/system/HTTP/CLIRequestTest.php
299-
300-
-
301-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-\-foo'', ''oops\-bar'', ''\-\-baz'', ''queue some stuff''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
302-
count: 1
303-
path: ../../tests/system/HTTP/CLIRequestTest.php
304-
305-
-
306-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile'', ''\-foo'', ''bar''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
307-
count: 1
308-
path: ../../tests/system/HTTP/CLIRequestTest.php
309-
310-
-
311-
message: '#^Assigning array\{''index\.php'', ''users'', ''21'', ''profile''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
312-
count: 1
313-
path: ../../tests/system/HTTP/CLIRequestTest.php
314-
315-
-
316-
message: '#^Assigning array\{''spark'', ''command'', ''param1'', ''param2'', ''\-\-opt1'', ''opt1val'', ''\-\-opt\-2'', ''opt 2 val'', ''param3''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
317-
count: 1
318-
path: ../../tests/system/HTTP/CLIRequestTest.php
319-
320180
-
321181
message: '#^Assigning ''10'' directly on offset ''HTTP_CONTENT_LENGTH'' of \$_SERVER is discouraged\.$#'
322182
count: 1
@@ -1052,46 +912,6 @@ parameters:
1052912
count: 1
1053913
path: ../../tests/system/RESTful/ResourceControllerTest.php
1054914

1055-
-
1056-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1057-
count: 2
1058-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1059-
1060-
-
1061-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1062-
count: 5
1063-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1064-
1065-
-
1066-
message: '#^Assigning 4 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1067-
count: 1
1068-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1069-
1070-
-
1071-
message: '#^Assigning array\{''index\.php'', ''work'', ''1'', ''edit''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1072-
count: 1
1073-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1074-
1075-
-
1076-
message: '#^Assigning array\{''index\.php'', ''work'', ''1''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1077-
count: 1
1078-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1079-
1080-
-
1081-
message: '#^Assigning array\{''index\.php'', ''work'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1082-
count: 3
1083-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1084-
1085-
-
1086-
message: '#^Assigning array\{''index\.php'', ''work'', ''new''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1087-
count: 1
1088-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1089-
1090-
-
1091-
message: '#^Assigning array\{''index\.php'', ''work''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1092-
count: 2
1093-
path: ../../tests/system/RESTful/ResourceControllerTest.php
1094-
1095915
-
1096916
message: '#^Assigning ''/work'' directly on offset ''REQUEST_URI'' of \$_SERVER is discouraged\.$#'
1097917
count: 1
@@ -1147,61 +967,6 @@ parameters:
1147967
count: 3
1148968
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1149969

1150-
-
1151-
message: '#^Assigning 2 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1152-
count: 1
1153-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1154-
1155-
-
1156-
message: '#^Assigning 3 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1157-
count: 4
1158-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1159-
1160-
-
1161-
message: '#^Assigning 4 directly on offset ''argc'' of \$_SERVER is discouraged\.$#'
1162-
count: 3
1163-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1164-
1165-
-
1166-
message: '#^Assigning array\{''index\.php'', ''work'', ''create''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1167-
count: 1
1168-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1169-
1170-
-
1171-
message: '#^Assigning array\{''index\.php'', ''work'', ''delete'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1172-
count: 1
1173-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1174-
1175-
-
1176-
message: '#^Assigning array\{''index\.php'', ''work'', ''edit'', ''1'', ''edit''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1177-
count: 1
1178-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1179-
1180-
-
1181-
message: '#^Assigning array\{''index\.php'', ''work'', ''new''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1182-
count: 1
1183-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1184-
1185-
-
1186-
message: '#^Assigning array\{''index\.php'', ''work'', ''remove'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1187-
count: 1
1188-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1189-
1190-
-
1191-
message: '#^Assigning array\{''index\.php'', ''work'', ''show'', ''1''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1192-
count: 1
1193-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1194-
1195-
-
1196-
message: '#^Assigning array\{''index\.php'', ''work'', ''update'', ''123''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1197-
count: 1
1198-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1199-
1200-
-
1201-
message: '#^Assigning array\{''index\.php'', ''work''\} directly on offset ''argv'' of \$_SERVER is discouraged\.$#'
1202-
count: 1
1203-
path: ../../tests/system/RESTful/ResourcePresenterTest.php
1204-
1205970
-
1206971
message: '#^Assigning ''adm\.example\.com'' directly on offset ''HTTP_HOST'' of \$_SERVER is discouraged\.$#'
1207972
count: 4

utils/phpstan-baseline/loader.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# total 3049 errors
1+
# total 2932 errors
22
includes:
33
- argument.type.neon
44
- assign.propertyType.neon

0 commit comments

Comments
 (0)