/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/HttpClient/Tests/TestLogger.php
24 строки
591 B
Nicolas Grekas
[HttpClient] Fix computing stats for PUSH with Amp
20 ноя 2024, 19:14
20 ноя 2024, 19:14
792b970
Код
Авторство
О чём код?
<?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\HttpClient\Tests; use Psr\Log\AbstractLogger; class TestLogger extends AbstractLogger { public array $logs = []; public function log($level, $message, array $context = []): void { $this->logs[] = preg_replace_callback('!\{([^\}\s]++)\}!', static fn ($m) => $context[$m[1]] ?? $m[0], $message); } }