Total Complexity | 6 |
Total Lines | 52 |
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 | 12 | 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 | 5 | public function interfaceExists(): bool |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return string |
||
44 | */ |
||
45 | 10 | public function value(): string |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return array |
||
52 | */ |
||
53 | 1 | public function toArray(): array |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * Get string representation of the value object. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | 2 | public function __toString(): string |
|
68 |