/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/ExpressionLanguage/Tests/Node/FunctionNodeTest.php
48 строк
1 KB
Dariusz Ruminski
PHP CS Fixer: enable static_lambda
19 дек 2025, 11:33
19 дек 2025, 11:33
3274fbc
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage\Tests\Node; use Symfony\Component\ExpressionLanguage\Node\ConstantNode; use Symfony\Component\ExpressionLanguage\Node\FunctionNode; use Symfony\Component\ExpressionLanguage\Node\Node; class FunctionNodeTest extends AbstractNodeTestCase { public static function getEvaluateData(): array { return [ ['bar', new FunctionNode('foo', new Node([new ConstantNode('bar')])), [], ['foo' => static::getCallables()]], ]; } public static function getCompileData(): array { return [ ['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')])), ['foo' => static::getCallables()]], ]; } public static function getDumpData(): array { return [ ['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')]))], ]; } protected static function getCallables(): array { return [ 'compiler' => static fn ($arg) => \sprintf('foo(%s)', $arg), 'evaluator' => static fn ($variables, $arg) => $arg, ]; } }