| Conditions | 5 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function __invoke( |
||
| 26 | ContainerInterface $container, |
||
| 27 | string $requestedName, |
||
| 28 | array $options = null |
||
| 29 | ): ErrorLogHandler { |
||
| 30 | $options = $options ?? $this->getServiceOptions($container, $requestedName); |
||
| 31 | |||
| 32 | /** @var Level|LevelName|LogLevel::* $level */ |
||
| 33 | $level = isset($options['level']) ? (int)$options['level'] : Logger::DEBUG; |
||
| 34 | 1 | ||
| 35 | return new ErrorLogHandler( |
||
| 36 | isset($options['message_type']) ? (int)$options['message_type'] : ErrorLogHandler::OPERATING_SYSTEM, |
||
| 37 | $level, |
||
| 38 | !isset($options['bubble']) || $options['bubble'], |
||
| 39 | 1 | isset($options['expand_new_lines']) && $options['expand_new_lines'] |
|
| 40 | ); |
||
| 43 |