Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Tests | 22 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 1 | public function __invoke(array $options) |
|
14 | { |
||
15 | 1 | $token = (string) ($options['token'] ?? ''); |
|
16 | 1 | $users = (array) ($options['users'] ?? []); |
|
17 | 1 | $title = $options['title'] ?? null; |
|
18 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
20 | 1 | $useSSL = (bool) ($options['useSSL'] ?? true); |
|
21 | 1 | $highPriorityLevel = (int) ($options['highPriorityLevel'] ?? Logger::CRITICAL); |
|
22 | 1 | $emergencyLevel = (int) ($options['emergencyLevel'] ?? Logger::EMERGENCY); |
|
23 | 1 | $retry = (int) ($options['retry'] ?? 30); |
|
24 | 1 | $expire = (int) ($options['expire'] ?? 25200); |
|
25 | |||
26 | 1 | return new PushoverHandler( |
|
27 | 1 | $token, |
|
28 | 1 | $users, |
|
29 | 1 | $title, |
|
30 | 1 | $level, |
|
31 | 1 | $bubble, |
|
32 | 1 | $useSSL, |
|
33 | 1 | $highPriorityLevel, |
|
34 | 1 | $emergencyLevel, |
|
35 | 1 | $retry, |
|
36 | 1 | $expire |
|
37 | ); |
||
38 | } |
||
39 | } |
||
40 |