@@ -30,7 +30,8 @@ function processFormatterList(array $formatters, int $id): array
3030 [$ id , , $ username ] = [10 , 'skipped_token ' , 'Alice ' ];
3131
3232 expect ($ id )->toBe (10 )
33- ->and ($ username )->toBe ('Alice ' );
33+ ->and ($ username )->toBe ('Alice ' )
34+ ;
3435
3536 expect (function () {
3637 /**
@@ -51,15 +52,16 @@ function processFormatterList(array $formatters, int $id): array
5152
5253 expect ($ id )->toBe (42 )
5354 ->and ($ street )->toBe ('Broadway ' )
54- ->and ($ zip )->toBe (90210 );
55+ ->and ($ zip )->toBe (90210 )
56+ ;
5557
5658 expect (function () {
5759 /**
5860 * @var positive-int $id
5961 * @var non-empty-string $street
6062 * @var int<10000, 99999> $zip
6163 */
62- [$ id , [$ street , $ zip ]] = [42 , ['' , 90210 ]];
64+ [$ id , [$ street , $ zip ]] = [42 , ['' , 90210 ]];
6365 })->toThrow (TypeError::class, 'Variable $street must be of type non-empty-string ' );
6466 });
6567 });
@@ -74,15 +76,17 @@ function processFormatterList(array $formatters, int $id): array
7476 $ collection ->add (20 );
7577
7678 expect ($ collection ->count ())->toBe (3 )
77- ->and ($ collection ->toArray ())->toBe ([10 , null , 20 ]);
79+ ->and ($ collection ->toArray ())->toBe ([10 , null , 20 ])
80+ ;
7881 });
7982
8083 test ('throws TypeError when adding invalid scalar to Collection<?positive-int> ' , function () {
8184 /** @var GenericCollection<?positive-int> $collection */
8285 $ collection = new GenericCollection ();
8386
8487 expect (fn () => $ collection ->add (-50 ))
85- ->toThrow (TypeError::class, 'Argument $item (template T = ?positive-int) must be of type positive-int, negative int (-50) given ' );
88+ ->toThrow (TypeError::class, 'Argument $item (template T = ?positive-int) must be of type positive-int, negative int (-50) given ' )
89+ ;
8690 });
8791 });
8892
@@ -100,11 +104,12 @@ function processFormatterList(array $formatters, int $id): array
100104 test ('throws TypeError when a callable in the collection returns an invalid type ' , function () {
101105 $ formatters = [
102106 fn (int $ id ): string => "id_ {$ id }" ,
103- fn (int $ id ): string => '' ,
107+ fn (int $ id ): string => '' ,
104108 ];
105109
106110 expect (fn () => processFormatterList ($ formatters , 42 ))
107- ->toThrow (TypeError::class, 'Callback $formatters[1] return value must be of type non-empty-string ' );
111+ ->toThrow (TypeError::class, 'Callback $formatters[1] return value must be of type non-empty-string ' )
112+ ;
108113 });
109114 });
110- });
115+ });
0 commit comments