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