@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | /** @var \ReflectionClass $reflection */ |
69 | 69 | $reflection = $this->getArtifact('reflection'); |
70 | 70 | |
71 | - if(strpos($config['property'], '.')) { |
|
71 | + if (strpos($config['property'], '.')) { |
|
72 | 72 | $this->applyFilterToRelation($config, $reflection, $queryBuilder, '_'.$index); |
73 | 73 | } else { |
74 | 74 | $this->applyRegularFilter($config, $reflection, $queryBuilder, '_'.$index); |
@@ -142,10 +142,7 @@ discard block |
||
142 | 142 | protected function getRelationAnnotation(\ReflectionProperty $property): Annotation |
143 | 143 | { |
144 | 144 | /** @var Annotation $annotation */ |
145 | - $annotation = $this->reader->getPropertyAnnotation($property, OneToOne::class) ?: |
|
146 | - $this->reader->getPropertyAnnotation($property, OneToMany::class) ?: |
|
147 | - $this->reader->getPropertyAnnotation($property, ManyToMany::class) ?: |
|
148 | - $this->reader->getPropertyAnnotation($property, ManyToOne::class); |
|
145 | + $annotation = $this->reader->getPropertyAnnotation($property, OneToOne::class) ?: $this->reader->getPropertyAnnotation($property, OneToMany::class) ?: $this->reader->getPropertyAnnotation($property, ManyToMany::class) ?: $this->reader->getPropertyAnnotation($property, ManyToOne::class); |
|
149 | 146 | if (!$annotation) { |
150 | 147 | throw new BadRequestHttpException(sprintf('Property %s is not configured for filtering', $property->getName())); |
151 | 148 | } |