@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | public function __construct() |
| 17 | 17 | { |
| 18 | - $this->queryPartial = []; |
|
| 18 | + $this->queryPartial = [ ]; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $this->prepareOperator('$and'); |
| 29 | 29 | |
| 30 | - $this->queryPartial['$and'] = array_merge( |
|
| 31 | - $this->queryPartial['$and'], |
|
| 30 | + $this->queryPartial[ '$and' ] = array_merge( |
|
| 31 | + $this->queryPartial[ '$and' ], |
|
| 32 | 32 | $this->mapExpressions(...func_get_args()) |
| 33 | 33 | ); |
| 34 | 34 | |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $this->prepareOperator('$or'); |
| 46 | 46 | |
| 47 | - $this->queryPartial['$or'] = array_merge( |
|
| 48 | - $this->queryPartial['$or'], |
|
| 47 | + $this->queryPartial[ '$or' ] = array_merge( |
|
| 48 | + $this->queryPartial[ '$or' ], |
|
| 49 | 49 | $this->mapExpressions(...func_get_args()) |
| 50 | 50 | ); |
| 51 | 51 | |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | private function prepareOperator(string $operator) |
| 67 | 67 | { |
| 68 | - if (!isset($this->queryPartial[$operator])) { |
|
| 69 | - $this->queryPartial[$operator] = []; |
|
| 68 | + if (!isset($this->queryPartial[ $operator ])) { |
|
| 69 | + $this->queryPartial[ $operator ] = [ ]; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | private function mapExpressions($expressions): array |
| 79 | 79 | { |
| 80 | 80 | return array_map( |
| 81 | - function ($expression) { |
|
| 81 | + function($expression) { |
|
| 82 | 82 | return $expression instanceof Expression ? $expression->getQueryPartial() : $expression; |
| 83 | 83 | }, |
| 84 | 84 | func_get_args() |