Skip to content

Commit

Permalink
short closures ftw
Browse files Browse the repository at this point in the history
Co-authored-by: Fabien Potencier <fabien@potencier.org>
  • Loading branch information
faizanakram99 and fabpot authored Dec 12, 2024
1 parent 12c41d3 commit 80d42c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/TemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,7 @@ public static function getGetAttributeTests()
]);

// test for Closure::__invoke()
$closure = function (): string {
return 'closure called';
};
$closure = fn (): string => 'closure called';

$tests[] = [true, 'closure called', $closure, '__invoke', [], $anyType];

Expand Down

0 comments on commit 80d42c5

Please sign in to comment.