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