Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 1 | public function __invoke(array $options) |
|
14 | { |
||
15 | 1 | $host = (string) ($options['host'] ?? ''); |
|
16 | 1 | $port = (int) ($options['host'] ?? 514); |
|
17 | 1 | $facility = (int) ($options['facility'] ?? LOG_USER); |
|
18 | 1 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | 1 | $bubble = (bool) ($options['bubble'] ?? true); |
|
20 | 1 | $ident = (string) ($options['ident'] ?? 'php'); |
|
21 | |||
22 | 1 | return new SyslogUdpHandler( |
|
23 | 1 | $host, |
|
24 | 1 | $port, |
|
25 | 1 | $facility, |
|
26 | 1 | $level, |
|
27 | 1 | $bubble, |
|
28 | 1 | $ident |
|
29 | ); |
||
30 | } |
||
31 | } |
||
32 |