File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -16,20 +16,20 @@ public static function getParameterName(): string
1616 public function appendQuery (): void
1717 {
1818 foreach ($ this ->arguments as $ argument ) {
19-
2019 if (is_string ($ argument )) {
2120 $ this ->appendSimpleRelation ($ argument );
21+
2222 return ;
2323 }
2424
2525 if (is_array ($ argument ) && count ($ argument ) > 0 ) {
2626 $ this ->appendComplexRelation ($ argument );
27+
2728 return ;
2829 }
2930
30- throw new JsonQueryBuilderException (" Wrong relation parameters provided. " );
31+ throw new JsonQueryBuilderException (' Wrong relation parameters provided. ' );
3132 }
32-
3333 }
3434
3535 protected function appendSimpleRelation (string $ argument ): void
@@ -43,10 +43,8 @@ protected function appendComplexRelation(array $argument): void
4343 $ input = $ argument [$ relation ];
4444
4545 $ this ->builder ->with ([$ relation => function ($ query ) use ($ input ) {
46-
4746 $ jsonQuery = new JsonQuery ($ query ->getQuery (), $ input );
4847 $ jsonQuery ->search ();
49-
5048 }]);
5149 }
5250}
You can’t perform that action at this time.
0 commit comments