@@ -390,31 +390,35 @@ public function testRemoveArrayFromIterable(): void
390
390
391
391
public function testUnpackOperator (): void
392
392
{
393
+ $ expectedType = PHP_VERSION_ID >= 80000 ? 'bool|float|int|string|Stringable|null ' : 'bool|float|int|object|string|null ' ;
394
+
393
395
$ this ->analyse ([__DIR__ . '/data/unpack-operator.php ' ], [
394
396
[
395
- 'Parameter #2 ...$values of function sprintf expects bool|float|int|object|string|null , array<string> given. ' ,
397
+ sprintf ( 'Parameter #2 ...$values of function sprintf expects %s , array<string> given. ' , $ expectedType ) ,
396
398
18 ,
397
399
],
398
400
[
399
- 'Parameter #2 ...$values of function sprintf expects bool|float|int|object|string|null , array<int, string> given. ' ,
401
+ sprintf ( 'Parameter #2 ...$values of function sprintf expects %s , array<int, string> given. ' , $ expectedType ) ,
400
402
19 ,
401
403
],
402
404
[
403
- 'Parameter #2 ...$values of function sprintf expects bool|float|int|object|string|null , UnpackOperator\Foo given. ' ,
405
+ sprintf ( 'Parameter #2 ...$values of function sprintf expects %s , UnpackOperator\Foo given. ' , $ expectedType ) ,
404
406
22 ,
405
407
],
406
408
[
407
- 'Parameter #2 ...$values of function printf expects bool|float|int|object|string|null , UnpackOperator\Foo given. ' ,
409
+ sprintf ( 'Parameter #2 ...$values of function printf expects %s , UnpackOperator\Foo given. ' , $ expectedType ) ,
408
410
24 ,
409
411
],
410
412
]);
411
413
}
412
414
413
415
public function testFputCsv (): void
414
416
{
417
+ $ expectedType = PHP_VERSION_ID >= 80000 ? 'bool|float|int|string|Stringable|null ' : 'bool|float|int|object|string|null ' ;
418
+
415
419
$ this ->analyse ([__DIR__ . '/data/fputcsv-fields-parameter.php ' ], [
416
420
[
417
- 'Parameter #2 $fields of function fputcsv expects array<int|string, bool|float|int|object|string|null >, array<int, Fputcsv\Person> given. ' ,
421
+ sprintf ( 'Parameter #2 $fields of function fputcsv expects array<int|string, %s >, array<int, Fputcsv\Person> given. ' , $ expectedType ) ,
418
422
35 ,
419
423
],
420
424
]);
0 commit comments