| Conditions | 5 |
| Paths | 4 |
| Total Lines | 36 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 18 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 2 | protected function loadInternal(array $mergedConfig, ContainerBuilder $container) |
|
| 16 | { |
||
| 17 | 2 | $showMessagesFor = array(); |
|
| 18 | |||
| 19 | 2 | if (isset($mergedConfig['show_messages_for'])) { |
|
| 20 | 2 | $showMessagesFor = array_unique($mergedConfig['show_messages_for']); |
|
| 21 | } |
||
| 22 | |||
| 23 | // store the configuration in the messages |
||
| 24 | 2 | $container->setParameter( |
|
| 25 | 2 | 'sumo_coders_framework_error.show_messages_for', |
|
| 26 | $showMessagesFor |
||
| 27 | ); |
||
| 28 | |||
| 29 | if ( |
||
| 30 | 2 | $container->hasParameter('errbit_api_key') |
|
| 31 | 2 | && $container->getParameter('errbit_api_key') !== null |
|
| 32 | 2 | && $container->getParameter('errbit_api_key') !== '' |
|
| 33 | ) { |
||
| 34 | 1 | $definition = new Definition( |
|
| 35 | 1 | 'SumoCoders\FrameworkErrorBundle\Listener\ConsoleExceptionListener', |
|
| 36 | 1 | array(new Reference('eo_airbrake.client')) |
|
| 37 | ); |
||
| 38 | 1 | $definition->addTag( |
|
| 39 | 1 | 'kernel.event_listener', |
|
| 40 | array( |
||
| 41 | 1 | 'event' => 'console.exception', |
|
| 42 | 'method' => 'onConsoleException', |
||
| 43 | ) |
||
| 44 | ); |
||
| 45 | 1 | $container->setDefinition( |
|
| 46 | 1 | 'sumocoders_console_error_handler', |
|
| 47 | $definition |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | 2 | } |
|
| 51 | } |
||
| 52 |