| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function __invoke(ContainerInterface $container) |
||
| 17 | { |
||
| 18 | /** @var array $optionsArray */ |
||
| 19 | $optionsArray = $container->get('config')['facile']['sentry']['client'][$this->name]; |
||
| 20 | |||
| 21 | $options = new ClientOptions($optionsArray); |
||
| 22 | |||
| 23 | $ravenClient = new \Raven_Client($options->getDsn(), $options->getOptions()); |
||
| 24 | |||
| 25 | $client = new Client($ravenClient, $options); |
||
| 26 | |||
| 27 | $errorHandlerListener = $container->get($options->getErrorHandlerListener()); |
||
| 28 | if ($errorHandlerListener instanceof ClientAwareInterface) { |
||
| 29 | $errorHandlerListener->setClient($client); |
||
| 30 | } |
||
| 31 | $client->setErrorHandlerListener($errorHandlerListener); |
||
| 32 | |||
| 33 | return $client; |
||
| 34 | } |
||
| 35 | } |
||
| 36 |