Conditions | 8 |
Paths | 5 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 8 |
Changes | 0 |
1 | <?php |
||
40 | 136 | private function addHandlers(Logger $logger, array $loggerConfig, ContainerInterface $container): void |
|
41 | { |
||
42 | 136 | $handlers = $loggerConfig['handlers'] ?? []; |
|
43 | 136 | if (!empty($handlers) && is_array($handlers)) { |
|
44 | 136 | foreach ($handlers as $handler) { |
|
45 | 136 | if (is_object($handler) && $handler instanceof HandlerInterface) { |
|
46 | 2 | $logger->pushHandler($handler); |
|
47 | 134 | } elseif (is_string($handler) && $container->has($handler)) { |
|
48 | 136 | $logger->pushHandler($container->get($handler)); |
|
49 | } |
||
50 | } |
||
51 | } |
||
52 | 136 | } |
|
53 | } |
||
54 |