| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function onBootstrap(EventInterface $e) |
||
| 35 | { |
||
| 36 | /** @var MvcEvent $e */ |
||
| 37 | $application = $e->getApplication(); |
||
| 38 | $container = $application->getServiceManager(); |
||
| 39 | $moduleConfig = $container->get('config')['facile']['sentry']; |
||
| 40 | $clients = array_keys($moduleConfig['client']); |
||
| 41 | |||
| 42 | $errorHandlerRegister = $container->get(ErrorHandlerRegister::class); |
||
| 43 | |||
| 44 | foreach ($clients as $serviceKey) { |
||
| 45 | $serviceName = sprintf('facile.sentry.client.%s', $serviceKey); |
||
| 46 | |||
| 47 | /** @var Client $raven */ |
||
| 48 | $client = $container->get($serviceName); |
||
| 49 | $errorHandlerRegister->registerHandlers($client, $application->getEventManager()); |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |