| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class ResolverMapRegistry implements ResolverRegistryInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | protected $resolverMap; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * ResolverMapRegistry constructor. |
||
| 14 | * @param array $resolverMap |
||
| 15 | */ |
||
| 16 | public function __construct(array $resolverMap = []) |
||
| 17 | { |
||
| 18 | $this->resolverMap = $resolverMap; |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param string $typeName |
||
| 23 | * @param string $fieldName |
||
| 24 | * @param callable $resolver |
||
| 25 | */ |
||
| 26 | public function register(string $typeName, string $fieldName, callable $resolver): void |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $typeName |
||
| 37 | * @param string $fieldName |
||
| 38 | * @return callable |
||
| 39 | */ |
||
| 40 | public function lookup(string $typeName, string $fieldName): ?callable |
||
| 44 | } |
||
| 45 | } |
||
| 46 |