| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | abstract class Component |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Instantiate the class. |
||
| 13 | * |
||
| 14 | * @param string $model |
||
| 15 | */ |
||
| 16 | 4 | public function __construct(protected string $model) |
|
| 17 | { |
||
| 18 | 4 | } |
|
| 19 | |||
| 20 | /** |
||
| 21 | * Statically instantiate the class |
||
| 22 | * |
||
| 23 | * @param string $model |
||
| 24 | * @return static |
||
| 25 | */ |
||
| 26 | 3 | public static function of(string $model): static |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Retrieve the inspected model component |
||
| 33 | * |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | abstract public function get(): mixed; |
||
| 37 | } |
||
| 38 |