| Total Complexity | 6 |
| Total Lines | 62 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class ClassString extends ValueObject |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Create a new instance of the value object. |
||
| 17 | * |
||
| 18 | * @param string|null $string |
||
| 19 | */ |
||
| 20 | 16 | public function __construct(protected ?string $string) |
|
| 21 | { |
||
| 22 | // |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Determine if the class exists for this class string. |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | 5 | public function classExists(): bool |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Determine if the interface exists for this class string. |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 5 | public function interfaceExists(): bool |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Instantiate the class string if possible. |
||
| 47 | * |
||
| 48 | * @return object |
||
| 49 | */ |
||
| 50 | 1 | public function instantiate(): object |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Instantiate the class string if possible. |
||
| 57 | * |
||
| 58 | * @param array $parameters |
||
| 59 | * |
||
| 60 | * @return object |
||
| 61 | */ |
||
| 62 | 1 | public function instantiateWith(array $parameters = []): object |
|
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Get the object value. |
||
| 69 | * |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | 13 | public function value(): string |
|
| 77 |