| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 1 | public function __invoke(array $options) |
|
| 18 | { |
||
| 19 | 1 | $client = $this->getService($options['client'] ?? null); |
|
| 20 | 1 | $index = (string) ($options['index'] ?? 'monolog'); |
|
| 21 | 1 | $type = (string) ($options['type'] ?? 'record'); |
|
| 22 | 1 | $ignoreError = (bool) ($options['ignoreError'] ?? false); |
|
| 23 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
| 24 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
| 25 | |||
| 26 | 1 | return new ElasticaHandler( |
|
| 27 | 1 | $client, |
|
| 28 | [ |
||
| 29 | 1 | 'index' => $index, |
|
| 30 | 1 | 'type' => $type, |
|
| 31 | 1 | 'ignore_error' => $ignoreError |
|
| 32 | ], |
||
| 33 | 1 | $level, |
|
| 34 | 1 | $bubble |
|
| 35 | ); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |