| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | 10 | public function __invoke(ContainerInterface $container): ThrowableHandlerAggregate |
|
| 36 | { |
||
| 37 | 10 | $handler = new ThrowableHandlerAggregate(); |
|
| 38 | |||
| 39 | 10 | if ($container->has(CallableThrowableHandler::class)) { |
|
| 40 | 1 | $handler->attach($container->get(CallableThrowableHandler::class)); |
|
| 41 | } |
||
| 42 | |||
| 43 | 10 | if ($container->has(EventDispatcherInterface::class)) { |
|
| 44 | 9 | $handler->attach($container->get(DispatchThrowableHandler::class)); |
|
| 45 | 9 | $handler->attach($container->get(DispatchErrorEventThrowableHandler::class)); |
|
| 46 | } |
||
| 47 | |||
| 48 | 10 | return $handler; |
|
| 49 | } |
||
| 51 |