| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class Icon extends Component |
||
| 14 | { |
||
| 15 | public string $uuid; |
||
| 16 | |||
| 17 | public function __construct( |
||
| 22 | } |
||
| 23 | |||
| 24 | public function icon(): string|Stringable |
||
| 29 | } |
||
| 30 | |||
| 31 | public function labelClasses(): ?string |
||
| 32 | { |
||
| 33 | // Remove `w-*` and `h-*` classes, because it applies only for icon |
||
| 34 | return Str::replaceMatches('/(w-\w*)|(h-\w*)/', '', $this->attributes->get('class') ?? ''); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get the view / contents that represent the component. |
||
| 39 | */ |
||
| 40 | public function render(): View|Closure|string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |