Conditions | 6 |
Paths | 6 |
Total Lines | 31 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | public function setOptions(? Iterable $config = null): AdapterInterface |
||
46 | { |
||
47 | if (null === $config) { |
||
48 | return $this; |
||
49 | } |
||
50 | |||
51 | foreach ($config as $option => $value) { |
||
52 | switch ($option) { |
||
53 | case 'ident': |
||
54 | $this->ident = (string) $value; |
||
55 | unset($config[$option]); |
||
56 | |||
57 | break; |
||
58 | case 'option': |
||
59 | $this->option = (int) (string) $value; |
||
60 | unset($config[$option]); |
||
61 | |||
62 | break; |
||
63 | case 'facility': |
||
64 | $this->facility = (int) (string) $value; |
||
65 | unset($config[$option]); |
||
66 | |||
67 | break; |
||
68 | } |
||
69 | } |
||
70 | |||
71 | parent::setOptions($config); |
||
72 | |||
73 | openlog($this->ident, $this->option, $this->facility); |
||
74 | |||
75 | return $this; |
||
76 | } |
||
91 |