| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class Instance implements Type |
||
| 10 | { |
||
| 11 | private $class; |
||
| 12 | |||
| 13 | 29 | public function __construct(string $class) |
|
| 16 | 29 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritdoc} |
||
| 20 | */ |
||
| 21 | 9 | public function accepts($value): bool |
|
| 22 | { |
||
| 23 | 9 | return $value instanceof $this->class; |
|
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | 9 | public static function fromString(Str $value): Type |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | 14 | public function __toString(): string |
|
| 42 |