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