| Conditions | 3 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 15 | 93 | public function setOption(string $key, mixed $value, bool $useInternalMethods = true): static |
|
| 16 | { |
||
| 17 | 93 | $method = 'set' . ucfirst($key); |
|
| 18 | 93 | if ($useInternalMethods === true && method_exists($this, $method)) { |
|
| 19 | 1 | $this->$method($value); |
|
| 20 | 1 | return $this; |
|
| 21 | } |
||
| 22 | |||
| 23 | 93 | $this->options[$key] = $value; |
|
| 24 | 93 | return $this; |
|
| 25 | } |
||
| 60 |