/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Console/ArgumentResolver/ValueResolver/TraceableValueResolver.php
40 строк
1 KB
Nicolas Grekas
[Console] Various fixes and hardenings
18 май 2026, 20:28
18 май 2026, 20:28
ce7d676
Код
Авторство
О чём код?
<?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\Console\ArgumentResolver\ValueResolver; use Symfony\Component\Console\Attribute\Reflection\ReflectionMember; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Stopwatch\Stopwatch; /** * @author Robin Chalas <robin.chalas@gmail.com> */ final class TraceableValueResolver implements ValueResolverInterface { public function __construct( private ValueResolverInterface $inner, private Stopwatch $stopwatch, ) { } public function resolve(string $argumentName, InputInterface $input, ReflectionMember $member): iterable { $method = $this->inner::class.'::'.__FUNCTION__; $this->stopwatch->start($method, 'command.argument_value_resolver'); try { yield from $this->inner->resolve($argumentName, $input, $member); } finally { $this->stopwatch->stop($method); } } }