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 |
||
27 | public function getOption(string $key, mixed $defaults = null, bool $useInternalMethods = true): mixed |
||
28 | { |
||
29 | $method = 'get' . ucfirst($key); |
||
30 | if ($useInternalMethods === true && method_exists($this, $method)) { |
||
31 | return $this->$method($defaults); |
||
32 | } |
||
33 | |||
34 | if (isset($this->options[$key])) { |
||
35 | return $this->options[$key]; |
||
36 | } |
||
37 | return $defaults; |
||
38 | } |
||
60 |