| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class ExportReader |
||
| 15 | { |
||
| 16 | use AnnotationReaderTrait; |
||
| 17 | |||
| 18 | public function getFields(\ReflectionClass $class): array |
||
| 19 | { |
||
| 20 | $properties = []; |
||
| 21 | |||
| 22 | foreach ($class->getProperties() as $property) { |
||
| 23 | if ($annotation = $this->getPropertyAnnotation($property, ExportField::class)) { |
||
| 24 | $properties[$annotation->label ?? $property->getName()] = $property->getName(); |
||
|
|
|||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $properties; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getFormats(\ReflectionClass $class): array |
||
| 38 | } |
||
| 39 | } |
||
| 40 |