| Total Complexity | 6 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class ClassString implements ValueObject |
||
| 13 | { |
||
| 14 | use Macroable, Conditionable, Tappable; |
||
|
|
|||
| 15 | |||
| 16 | /** |
||
| 17 | * Create a new value object instance. |
||
| 18 | * |
||
| 19 | * @param string|null $classString |
||
| 20 | */ |
||
| 21 | 10 | final public function __construct(public ?string $classString) |
|
| 22 | { |
||
| 23 | // |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Return a new instance of value object. |
||
| 28 | * |
||
| 29 | * @param string|null $classString |
||
| 30 | * |
||
| 31 | * @return static |
||
| 32 | */ |
||
| 33 | 3 | public static function make(?string $classString): static |
|
| 34 | { |
||
| 35 | 3 | return new static($classString); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | 5 | public function isClassExists(): bool |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | 4 | public function isInterfaceExists(): bool |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get the last name. |
||
| 56 | * |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | 4 | public function getClassString(): string |
|
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Return the first UUID if cast to string. |
||
| 66 | * |
||
| 67 | * @return string |
||
| 68 | */ |
||
| 69 | 2 | public function __toString(): string |
|
| 74 |