Conditions | 2 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function getVisitor(TypeInfo $info, array &$contexts) { |
||
15 | return [ |
||
16 | NodeKind::FIELD => [ |
||
17 | 'leave' => function (FieldNode $field) use ($info, &$contexts) { |
||
|
|||
18 | $definition = $info->getFieldDef(); |
||
19 | if (!empty($definition->config['contexts'])) { |
||
20 | $contexts = array_unique(array_merge($contexts, $definition->config['contexts'])); |
||
21 | } |
||
22 | }, |
||
23 | ], |
||
24 | ]; |
||
25 | } |
||
26 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.