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 | 33 | public function __invoke(ContainerInterface $container): ThrowableHandlerAggregate |
|
36 | { |
||
37 | 33 | $handler = new ThrowableHandlerAggregate(); |
|
38 | |||
39 | 33 | if ($container->has(CallableThrowableHandler::class)) { |
|
40 | 1 | $handler->attach($container->get(CallableThrowableHandler::class)); |
|
41 | } |
||
42 | |||
43 | 33 | if ($container->has(EventDispatcherInterface::class)) { |
|
44 | 30 | $handler->attach($container->get(DispatchThrowableHandler::class)); |
|
45 | 30 | $handler->attach($container->get(DispatchErrorEventThrowableHandler::class)); |
|
46 | } |
||
47 | |||
48 | 33 | return $handler; |
|
49 | } |
||
51 |