| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function getOption(string $key, mixed $defaults = null, bool $useInternalMethods = true): mixed |
||
| 30 | { |
||
| 31 | $method = 'get' . ucfirst($key); |
||
| 32 | if ($useInternalMethods === true && method_exists($this, $method)) { |
||
| 33 | return $this->$method($defaults); |
||
| 34 | } |
||
| 35 | |||
| 36 | if (isset($this->options[$key])) { |
||
| 37 | return $this->options[$key]; |
||
| 38 | } |
||
| 39 | return $defaults; |
||
| 40 | } |
||
| 62 |