-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
361 lines (301 loc) · 15.3 KB
/
phpstan.neon.dist
File metadata and controls
361 lines (301 loc) · 15.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
parameters:
level: max
treatPhpDocTypesAsCertain: false
paths:
- src
ignoreErrors:
- "#.*no value type specified in iterable type array.*#"
# Exception still thrown in PHP 8, not sure why phpstan complains
-
message: "#^Dead catch - UnexpectedValueException is never thrown in the try block\\.$#"
count: 2
path: src/BatchResult.php
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addSuccess\\(\\) has no return type specified\\.$#"
count: 1
path: src/Plugin/Journal.php
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\Journal\\:\\:addFailure\\(\\) has no return type specified\\.$#"
count: 1
path: src/Plugin/Journal.php
-
message: "#^Call to an undefined method Http\\\\Client\\\\HttpAsyncClient\\:\\:sendRequest\\(\\)\\.$#"
count: 1
path: src/PluginClient.php
-
message: "#^Method Http\\\\Client\\\\Common\\\\EmulatedHttpClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
count: 1
path: src/EmulatedHttpClient.php
# we still support the obsolete RequestFactory for BC but do not require the package anymore
-
message: "#^Call to method createRequest\\(\\) on an unknown class Http\\\\Message\\\\RequestFactory\\.$#"
count: 1
path: src/HttpMethodsClient.php
-
message: "#^Class Http\\\\Message\\\\RequestFactory not found\\.$#"
count: 4
path: src/HttpMethodsClient.php
-
message: "#^Parameter \\$requestFactory of method Http\\\\Client\\\\Common\\\\HttpMethodsClient\\:\\:__construct\\(\\) has invalid type Http\\\\Message\\\\RequestFactory\\.$#"
count: 1
path: src/HttpMethodsClient.php
-
message: "#^Property Http\\\\Client\\\\Common\\\\HttpMethodsClient\\:\\:\\$requestFactory has unknown class Http\\\\Message\\\\RequestFactory as its type\\.$#"
count: 1
path: src/HttpMethodsClient.php
-
message: "#^Anonymous function should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
count: 1
path: src/Plugin/RedirectPlugin.php
# phpstan is confused by the optional dependencies. we check for existence first
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\RedirectPlugin::guessStreamFactory\\(\\) should return Psr\\\\Http\\\\Message\\\\StreamFactoryInterface\\|null but returns Nyholm\\\\Psr7\\\\Factory\\\\Psr17Factory\\.$#"
count: 1
path: src/Plugin/RedirectPlugin.php
# phpstan is confused by the optional dependencies. we check for existence first
-
message: "#^Call to static method streamFor\\(\\) on an unknown class GuzzleHttp\\\\Psr7\\\\Utils\\.$#"
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: "#^Method Psr\\\\Http\\\\Message\\\\StreamFactoryInterface@anonymous\/Plugin\/RedirectPlugin.php:221\\:\\:createStream\\(\\) should return Psr\\\\Http\\\\Message\\\\StreamInterface but returns mixed\\.$#"
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\RetryPlugin\\:\\:retry\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
count: 1
path: src/Plugin/RetryPlugin.php
-
message: "#^Method Http\\\\Client\\\\Common\\\\PluginClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#"
count: 2
path: src/PluginClient.php
-
message: '#^Method Http\\Client\\Common\\BatchResult\:\:getExceptionFor\(\) has UnexpectedValueException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/BatchResult.php
-
message: '#^Method Http\\Client\\Common\\BatchResult\:\:getResponseFor\(\) has UnexpectedValueException in PHPDoc @throws tag but it''s not thrown\.$#'
identifier: throws.unusedType
count: 1
path: src/BatchResult.php
-
message: '#^Parameter \#1 \$response of method Http\\Client\\Common\\Deferred\:\:resolve\(\) expects Psr\\Http\\Message\\ResponseInterface, mixed given\.$#'
identifier: argument.type
count: 2
path: src/Deferred.php
-
message: '#^Invalid type mixed to throw\.$#'
identifier: throw.notThrowable
count: 1
path: src/HttpClientPool/HttpClientPoolItem.php
-
message: '#^Method Http\\Client\\Common\\HttpMethodsClient\:\:createRequest\(\) should return Psr\\Http\\Message\\RequestInterface but returns mixed\.$#'
identifier: return.type
count: 1
path: src/HttpMethodsClient.php
-
message: '#^Parameter \#2 \$value of method Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects array\<string\>\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/HttpMethodsClient.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\AddHostPlugin\:\:\$replace \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/AddHostPlugin.php
-
message: '#^Parameter \#2 \$config of class Http\\Client\\Common\\Plugin\\AddHostPlugin constructor expects array\{replace\?\: bool\}, array given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/BaseUriPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\ContentTypePlugin\:\:\$sizeLimit \(int\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/ContentTypePlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\ContentTypePlugin\:\:\$skipDetection \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/ContentTypePlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\DecoderPlugin\:\:\$useContentEncoding \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/DecoderPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\ErrorPlugin\:\:\$onlyServerException \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/ErrorPlugin.php
-
message: '#^Parameter \#2 \$value of method Psr\\Http\\Message\\MessageInterface\:\:withAddedHeader\(\) expects array\<string\>\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/HeaderAppendPlugin.php
-
message: '#^Parameter \#2 \$value of method Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects array\<string\>\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/HeaderDefaultsPlugin.php
-
message: '#^Parameter \#1 \$name of method Psr\\Http\\Message\\MessageInterface\:\:hasHeader\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/HeaderRemovePlugin.php
-
message: '#^Parameter \#1 \$name of method Psr\\Http\\Message\\MessageInterface\:\:withoutHeader\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/HeaderRemovePlugin.php
-
message: '#^Parameter \#2 \$value of method Psr\\Http\\Message\\MessageInterface\:\:withHeader\(\) expects array\<string\>\|string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/HeaderSetPlugin.php
-
message: '#^Cannot access offset ''multiple'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''permanent'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''status'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''switch'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 4
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''to'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 2
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''unless'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot access offset ''uri'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Method Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:guessStreamFactory\(\) should return Psr\\Http\\Message\\StreamFactoryInterface\|null but returns mixed\.$#'
identifier: return.type
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Parameter \#1 \$method of method Psr\\Http\\Message\\RequestInterface\:\:withMethod\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Parameter \#2 \$haystack of function in_array expects array, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Parameter \#2 \$targetUri of method Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:buildRedirectRequest\(\) expects Psr\\Http\\Message\\UriInterface, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Parameter \#3 \$statusCode of method Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:buildRedirectRequest\(\) expects int, mixed given\.$#'
identifier: argument.type
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:\$preserveHeader \(array\|bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:\$streamFactory \(Psr\\Http\\Message\\StreamFactoryInterface\|null\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RedirectPlugin\:\:\$useDefaultForMultiple \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RedirectPlugin.php
-
message: '#^Cannot use \+\+ on mixed\.$#'
identifier: preInc.type
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RetryPlugin\:\:\$errorResponseDecider \(callable\(\)\: mixed\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RetryPlugin\:\:\$errorResponseDelay \(callable\(\)\: mixed\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RetryPlugin\:\:\$exceptionDecider \(callable\(\)\: mixed\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RetryPlugin\:\:\$exceptionDelay \(callable\(\)\: mixed\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\RetryPlugin\:\:\$retry \(int\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/RetryPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\SeekableBodyPlugin\:\:\$memoryBufferSize \(int\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/SeekableBodyPlugin.php
-
message: '#^Property Http\\Client\\Common\\Plugin\\SeekableBodyPlugin\:\:\$useFileBuffer \(bool\) does not accept mixed\.$#'
identifier: assign.propertyType
count: 1
path: src/Plugin/SeekableBodyPlugin.php
-
message: '#^Trait Http\\Client\\Common\\Plugin\\VersionBridgePlugin is used zero times and is not analysed\.$#'
identifier: trait.unused
count: 1
path: src/Plugin/VersionBridgePlugin.php
-
message: '#^Method Http\\Client\\Common\\PluginChain\:\:__invoke\(\) should return Http\\Promise\\Promise but returns mixed\.$#'
identifier: return.type
count: 1
path: src/PluginChain.php
-
message: '#^Parameter \#1 \$response of class Http\\Client\\Promise\\HttpFulfilledPromise constructor expects Psr\\Http\\Message\\ResponseInterface, mixed given\.$#'
identifier: argument.type
count: 1
path: src/PluginClient.php
-
message: '#^Parameter \#3 \$options of class Http\\Client\\Common\\PluginChain constructor expects array\{max_restarts\?\: int\}, array given\.$#'
identifier: argument.type
count: 1
path: src/PluginClient.php
-
message: '#^Parameter \#3 \$options of class Http\\Client\\Common\\PluginClient constructor expects array\{max_restarts\?\: int\}, array given\.$#'
identifier: argument.type
count: 1
path: src/PluginClientBuilder.php
-
message: '#^Trait Http\\Client\\Common\\VersionBridgeClient is used zero times and is not analysed\.$#'
identifier: trait.unused
count: 1
path: src/VersionBridgeClient.php