Total Complexity | 4 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | abstract class AbstractResolver implements ResolverInterface |
||
8 | { |
||
9 | /** |
||
10 | * @param mixed $rootValue |
||
11 | * @param array $args |
||
12 | * @param mixed $contextValues |
||
13 | * @param ResolveInfo|null $info |
||
14 | * @return mixed |
||
15 | */ |
||
16 | abstract public function resolve($rootValue, array $args, $contextValues = null, ?ResolveInfo $info = null); |
||
17 | |||
18 | /** |
||
19 | * @return mixed |
||
20 | */ |
||
21 | public function __invoke() |
||
22 | { |
||
23 | return $this->resolve(...\func_get_args()); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | public function getResolveCallback(): ?callable |
||
30 | { |
||
31 | return function ($rootValue, array $args, $contextValues = null, ?ResolveInfo $info = null) { |
||
32 | return $this->resolve(...\func_get_args()); |
||
33 | }; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritdoc |
||
38 | */ |
||
39 | public function getTypeResolver(): ?callable |
||
43 | }; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @param mixed $rootValue |
||
48 | * @param mixed $contextValues |
||
49 | * @param ResolveInfo|null $info |
||
50 | * @return callable|null |
||
51 | */ |
||
52 | public function resolveType($rootValue, $contextValues = null, ?ResolveInfo $info = null): ?callable |
||
56 | } |
||
57 | } |
||
58 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.