Conditions | 5 |
Paths | 9 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function configureFields(\ReflectionClass $class, ShowMapper $showMapper): void |
||
18 | { |
||
19 | foreach ($class->getProperties() as $property) { |
||
20 | if ($annotation = $this->getPropertyAnnotation($property, ShowField::class)) { |
||
21 | $showMapper->add($property->getName(), ...$annotation->getSettings()); |
||
22 | } |
||
23 | } |
||
24 | |||
25 | foreach ($class->getMethods() as $method) { |
||
26 | if ($annotation = $this->getMethodAnnotation($method, ShowField::class)) { |
||
27 | $showMapper->add($method->getName(), ...$annotation->getSettings()); |
||
28 | } |
||
32 |