| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class LazyTypeResolver |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var callable(mixed, mixed, Webonyx\ResolveInfo): ?string |
||
| 14 | */ |
||
| 15 | private readonly mixed $type; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param callable(mixed, mixed, Webonyx\ResolveInfo): ?string $type |
||
| 19 | * @param TypeRegistryInterface $typeRegistry |
||
| 20 | */ |
||
| 21 | 3 | public function __construct( |
|
| 22 | callable $type, |
||
| 23 | private readonly TypeRegistryInterface $typeRegistry, |
||
| 24 | ) { |
||
| 25 | 3 | $this->type = $type; |
|
|
|
|||
| 26 | } |
||
| 27 | |||
| 28 | 2 | public function __invoke(mixed $value, mixed $context, Webonyx\ResolveInfo $info): ?Webonyx\ObjectType |
|
| 31 | } |
||
| 32 | } |
||
| 33 |