| Conditions | 6 |
| Paths | 6 |
| Total Lines | 21 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | protected function getOption(string $name, $default = null) |
||
| 53 | { |
||
| 54 | if (!$this->hasOption($name)) { |
||
| 55 | return $default; |
||
| 56 | } |
||
| 57 | |||
| 58 | if (array_key_exists($name, $this->options)) { |
||
| 59 | return $this->options[$name]; |
||
| 60 | } |
||
| 61 | |||
| 62 | if (!isset($this->aliases[$name])) { |
||
| 63 | return $default; |
||
| 64 | } |
||
| 65 | |||
| 66 | foreach ($this->aliases as $source => $aliases) { |
||
| 67 | if (in_array($name, $aliases, true)) { |
||
| 68 | return $this->getOption($source); |
||
| 69 | } |
||
| 70 | } |
||
| 71 | |||
| 72 | return false; |
||
| 73 | } |
||
| 75 |