| Total Complexity | 3 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 60% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class ExceptionHandlerDependencyProvider extends AbstractDependencyProvider |
||
| 13 | { |
||
| 14 | public const EXCEPTION_HANDLER = 'exception.handler'; |
||
| 15 | |||
| 16 | public const EXCEPTION_REGISTER = 'exception.register'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container |
||
| 20 | * |
||
| 21 | * @return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface |
||
| 22 | */ |
||
| 23 | 1 | public function handleDependencies(DependencyContainerInterface $container): DependencyContainerInterface |
|
| 24 | { |
||
| 25 | $container[self::EXCEPTION_HANDLER] = function () { |
||
| 26 | 1 | return new HandlerCollection( |
|
| 27 | 1 | $this->getExceptionHandler() |
|
| 28 | ); |
||
| 29 | }; |
||
| 30 | |||
| 31 | $container[self::EXCEPTION_REGISTER] = function () { |
||
| 32 | 1 | return new RegisterCollection( |
|
| 33 | 1 | $this->getExceptionRegister() |
|
| 34 | ); |
||
| 35 | }; |
||
| 36 | |||
| 37 | 1 | return $container; |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return \Xervice\ExceptionHandler\Business\Model\Handler\ExceptionHandlerInterface[] |
||
| 42 | */ |
||
| 43 | public function getExceptionHandler(): array |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return \Xervice\ExceptionHandler\Business\Model\Register\RegisterInterface[] |
||
| 50 | */ |
||
| 51 | public function getExceptionRegister(): array |
||
| 54 | } |
||
| 55 | } |
||
| 56 |