Total Complexity | 3 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | trait ResolverTrait |
||
8 | { |
||
9 | /** |
||
10 | * @return callable|null |
||
11 | */ |
||
12 | public function getTypeResolver(): ?callable |
||
16 | }; |
||
17 | } |
||
18 | |||
19 | /** |
||
20 | * @param mixed $rootValue |
||
21 | * @param mixed $context |
||
22 | * @param ResolveInfo|null $info |
||
23 | * @return callable|null |
||
24 | */ |
||
25 | public function resolveType($rootValue, $context = null, ?ResolveInfo $info = null): ?callable |
||
26 | { |
||
27 | // Override this method when your resolver returns an interface or an union type. |
||
28 | return null; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return array|null |
||
33 | */ |
||
34 | public function getMiddleware(): ?array |
||
37 | } |
||
38 | } |
||
39 |
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.