| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait OptionsTrait |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * OptionsTrait constructor. |
||
| 11 | * |
||
| 12 | * @param string $label |
||
| 13 | * @param array $options |
||
| 14 | */ |
||
| 15 | public function __construct(string $label, array $options = []) |
||
| 16 | { |
||
| 17 | parent::__construct($label); |
||
| 18 | |||
| 19 | $this->withOptions($options); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Set options list. |
||
| 24 | * |
||
| 25 | * @param array $options |
||
| 26 | * |
||
| 27 | * @return FormField |
||
| 28 | */ |
||
| 29 | public function withOptions(array $options) |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get options list. |
||
| 36 | * |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function options() |
||
| 42 | } |
||
| 43 | } |
||
| 44 |