| Total Complexity | 5 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class RadioItem implements MenuItemInterface, ToggableItemInterface, RadioInterface |
||
| 9 | { |
||
| 10 | use ToggableTrait; |
||
| 11 | |||
| 12 | public function __construct( |
||
| 13 | string $text, |
||
| 14 | callable $selectAction, |
||
| 15 | bool $showItemExtra = false, |
||
| 16 | bool $disabled = false |
||
| 17 | ) { |
||
| 18 | $this->text = $text; |
||
| 19 | $this->selectAction = $selectAction; |
||
| 20 | $this->showItemExtra = $showItemExtra; |
||
| 21 | $this->disabled = $disabled; |
||
| 22 | |||
| 23 | $this->style = new Style\RadioStyle(); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getStyle() : Style\ItemStyleInterface |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param Style\RadioStyle|Style\ItemStyleInterface $style |
||
| 33 | * @return $this |
||
| 34 | */ |
||
| 35 | public function setStyle(Style\ItemStyleInterface $style) : self |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Execute the items callable if required |
||
| 44 | */ |
||
| 45 | public function getSelectAction() : ?callable |
||
| 75 |