@@ -1322,7 +1322,7 @@ public function testForAllPromiseWillSuppressErrors(): void
13221322 {
13231323 $ map = new GenericOrderedList (['bar ' ]);
13241324
1325- $ callback = static function (): void {
1325+ $ callback = function (): void {
13261326 throw new RuntimeException ();
13271327 };
13281328 $ map ->forAll ($ callback )->suppressErrors ();
@@ -1334,15 +1334,15 @@ public function testForAllPromiseWillSuppressErrors(): void
13341334 public function testForAllPromiseWillExecuteFinallyMethodBeforeThrowingException (): void
13351335 {
13361336 $ callbackInvoked = false ;
1337- $ callback = static function () use (&$ callbackInvoked ): void {
1337+ $ callback = function () use (&$ callbackInvoked ): void {
13381338 $ callbackInvoked = true ;
13391339 };
13401340
13411341 $ map = new GenericOrderedList (['bar ' ]);
13421342
13431343 $ runtimeExceptionCaught = false ;
13441344 try {
1345- $ map ->forAll (static function (): void {
1345+ $ map ->forAll (function (): void {
13461346 throw new RuntimeException ();
13471347 })->finally ($ callback );
13481348 } catch (RuntimeException $ exception ) {
@@ -1419,7 +1419,7 @@ public function testWillFindIndexOfFirstMatchingItem(): void
14191419 ]);
14201420
14211421 /** @psalm-suppress TypeDoesNotContainType Might be a psalm bug */
1422- self ::assertSame (1 , $ list ->findFirstMatchingIndex (static fn (int $ value ) => $ value % 10 === 0 ));
1422+ self ::assertSame (1 , $ list ->findFirstMatchingIndex (fn (int $ value ) => $ value % 10 === 0 ));
14231423 }
14241424
14251425 public function testWillReturnNullWhenNoItemMatchesFilter (): void
@@ -1431,7 +1431,7 @@ public function testWillReturnNullWhenNoItemMatchesFilter(): void
14311431 8 ,
14321432 ]);
14331433
1434- self ::assertNull ($ list ->findFirstMatchingIndex (static fn (int $ value ) => $ value % 2 !== 0 ));
1434+ self ::assertNull ($ list ->findFirstMatchingIndex (fn (int $ value ) => $ value % 2 !== 0 ));
14351435 }
14361436
14371437 public function testWillPrependValueToTheList (): void
@@ -1458,12 +1458,12 @@ public function testWillReduceOrderedList(): void
14581458
14591459 self ::assertSame (
14601460 15 ,
1461- $ list ->reduce (static fn (int $ carry , int $ value ) => $ value + $ carry , 0 ),
1461+ $ list ->reduce (fn (int $ carry , int $ value ) => $ value + $ carry , 0 ),
14621462 'A sum of all values were expected. ' ,
14631463 );
14641464 self ::assertSame (
14651465 120 ,
1466- $ list ->reduce (static fn (int $ carry , int $ value ) => $ carry === 0 ? $ value : $ value * $ carry , 0 ),
1466+ $ list ->reduce (fn (int $ carry , int $ value ) => $ carry === 0 ? $ value : $ value * $ carry , 0 ),
14671467 'Expected that all values are being multiplied with each other ' ,
14681468 );
14691469 }
0 commit comments