Conditions | 3 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function visit(array $args, FieldInterface $field, $children) { |
||
29 | /** @var \Youshido\GraphQL\Config\Field\FieldConfig $config */ |
||
30 | $config = $field->getConfig(); |
||
31 | $cost = $config->get('cost', NULL); |
||
32 | |||
33 | if (is_callable($cost)) { |
||
34 | $cost = $cost($args, $field, $children); |
||
35 | } |
||
36 | |||
37 | return isset($cost) ? $cost : $this->defaultCost; |
||
38 | } |
||
39 | |||
53 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.