Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function visit(array $args, FieldInterface $field, $child) { |
||
31 | /** @var \Youshido\GraphQL\Config\Field\FieldConfig $config */ |
||
32 | $config = $field->getConfig(); |
||
33 | $cost = $config->get('cost', NULL); |
||
34 | |||
35 | if (is_callable($cost)) { |
||
36 | $cost = $cost($args, $field, $child); |
||
37 | } |
||
38 | |||
39 | return $cost; |
||
40 | } |
||
41 | |||
64 | } |