| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class MenuItemComponent extends HtmlComponent |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | public static string $tag = 'a'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param bool $active |
||
| 16 | * |
||
| 17 | * @return static |
||
| 18 | */ |
||
| 19 | public function active(bool $active): static |
||
| 20 | { |
||
| 21 | $active && $this->element()->addClass('active'); |
||
| 22 | return $this; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param bool $disabled |
||
| 27 | * |
||
| 28 | * @return static |
||
| 29 | */ |
||
| 30 | public function disabled(bool $disabled): static |
||
| 34 | } |
||
| 35 | } |
||
| 36 |