Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 10 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
23 | public function resolveValues($value, array $args, ResolveInfo $info) { |
||
24 | $definition = $this->getPluginDefinition(); |
||
25 | $property = $definition['property']; |
||
26 | $result = $value->get($property); |
||
27 | if (($type = $info->getReturnType()->getNamedType()) && $type instanceof AbstractScalarType) { |
||
28 | $result = $type->serialize($result); |
||
29 | } |
||
30 | |||
31 | yield $result; |
||
32 | } |
||
33 | |||
35 |