Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php |
||
31 | 3 | public function extract(AnnotationInterface $annotation, ResourceInterface $object, array $json): array |
|
32 | { |
||
33 | 3 | if (!($annotation instanceof Rename)) { |
|
34 | return $json; |
||
35 | } |
||
36 | |||
37 | 3 | foreach ($annotation->properties() as $property) { |
|
38 | 3 | $json[$annotation->get($property)] = $json[$property]; |
|
39 | 3 | unset($json[$property]); |
|
40 | } |
||
41 | |||
42 | 3 | return $json; |
|
43 | } |
||
44 | } |
||
45 |