Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | class ClassString extends ValueObject |
||
15 | { |
||
16 | use Macroable, Conditionable; |
||
|
|||
17 | |||
18 | /** |
||
19 | * @param string|null $classString |
||
20 | */ |
||
21 | 11 | public function __construct(protected ?string $classString) |
|
23 | // |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return bool |
||
28 | */ |
||
29 | 5 | public function classExists(): bool |
|
30 | { |
||
31 | 5 | return class_exists($this->value()); |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return bool |
||
36 | */ |
||
37 | 4 | public function interfaceExists(): bool |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | 9 | public function value(): string |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * Get string representation of the value object. |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 2 | public function __toString(): string |
|
60 |