@@ -390,31 +390,35 @@ public function testRemoveArrayFromIterable(): void
390390
391391	public  function  testUnpackOperator (): void 
392392	{
393+ 		$ expectedTypePHP_VERSION_ID  >= 80000  ? 'bool|float|int|string|Stringable|null '  : 'bool|float|int|object|string|null ' ;
394+ 393395		$ this analyse ([__DIR__  . '/data/unpack-operator.php ' ], [
394396			[
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 ) ,
396398				18 ,
397399			],
398400			[
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 ) ,
400402				19 ,
401403			],
402404			[
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 ) ,
404406				22 ,
405407			],
406408			[
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 ) ,
408410				24 ,
409411			],
410412		]);
411413	}
412414
413415	public  function  testFputCsv (): void 
414416	{
417+ 		$ expectedTypePHP_VERSION_ID  >= 80000  ? 'bool|float|int|string|Stringable|null '  : 'bool|float|int|object|string|null ' ;
418+ 415419		$ this analyse ([__DIR__  . '/data/fputcsv-fields-parameter.php ' ], [
416420			[
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 ) ,
418422				35 ,
419423			],
420424		]);
0 commit comments