| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class AbstractResolver implements ResolverInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @inheritdoc |
||
| 11 | */ |
||
| 12 | public function getResolveMethod(string $fieldName): ?callable |
||
| 13 | { |
||
| 14 | $resolveMethod = 'resolve' . \ucfirst($fieldName); |
||
| 15 | |||
| 16 | if (\method_exists($this, $resolveMethod)) { |
||
| 17 | return [$this, $resolveMethod]; |
||
|
|
|||
| 18 | } |
||
| 19 | |||
| 20 | return null; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @inheritdoc |
||
| 25 | */ |
||
| 26 | public function getTypeResolver(): ?callable |
||
| 30 | }; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param mixed $rootValue |
||
| 35 | * @param mixed $contextValues |
||
| 36 | * @param ResolveInfo $info |
||
| 37 | * @return callable|null |
||
| 38 | */ |
||
| 39 | protected function resolveType($rootValue, $contextValues, ResolveInfo $info): ?callable |
||
| 44 |