mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-03 10:27:22 +00:00
Replace the deprecated twig_test_even function in the custom test example
This commit is contained in:
+1
-1
@@ -846,7 +846,7 @@ The ``getTests()`` method lets you add new test functions::
|
||||
public function getTests()
|
||||
{
|
||||
return [
|
||||
new \Twig\TwigTest('even', 'twig_test_even'),
|
||||
new \Twig\TwigTest('even', fn (int $value): bool => 0 === $value % 2),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user