Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 16 |
Ratio | 100 % |
Tests | 12 |
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 | $database = (string) ($options['database'] ?? ''); |
|
21 | 1 | $collection = (string) ($options['collection'] ?? ''); |
|
22 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
23 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
24 | |||
25 | 1 | return new MongoDBHandler( |
|
26 | 1 | $client, |
|
27 | 1 | $database, |
|
28 | 1 | $collection, |
|
29 | 1 | $level, |
|
30 | 1 | $bubble |
|
31 | ); |
||
32 | } |
||
33 | } |
||
34 |