| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | trait Options |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | private $options = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $key |
||
| 20 | * @param mixed $default |
||
| 21 | * @return mixed |
||
| 22 | */ |
||
| 23 | public function option(string $key, $default = null) |
||
| 24 | { |
||
| 25 | return $this->options[$key] ?? $default; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param array $override |
||
| 30 | * @return static |
||
| 31 | */ |
||
| 32 | public function setOptions(array $override) : self |
||
| 36 | } |
||
| 37 | } |
||
| 38 |