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