Completed
Push — master ( 355d35...8c8d02 )
by Iakov
03:38
created
RequestProcessor/Step/Filter/FilterStep.php 1 patch
Spacing   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.