| Total Complexity | 4 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class ClassString extends ValueObject |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Create a new instance of the value object. |
||
| 16 | * |
||
| 17 | * @param string|null $classString |
||
| 18 | */ |
||
| 19 | 12 | public function __construct(protected ?string $classString) |
|
| 20 | { |
||
| 21 | // |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return bool |
||
| 26 | */ |
||
| 27 | 5 | public function classExists(): bool |
|
| 28 | { |
||
| 29 | 5 | return class_exists($this->value()); |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | 5 | public function interfaceExists(): bool |
|
| 36 | { |
||
| 37 | 5 | return interface_exists($this->value()); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get the object value. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 10 | public function value(): string |
|
| 48 | } |
||
| 49 | } |
||
| 50 |