@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | public function __construct() |
| 17 | 17 | { |
| 18 | - $this->filters = []; |
|
| 18 | + $this->filters = [ ]; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | /** |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $this->prepareFilterIndex('$and'); |
| 29 | 29 | |
| 30 | - $this->filters['$and'] = array_merge( |
|
| 31 | - $this->filters['$and'], |
|
| 30 | + $this->filters[ '$and' ] = array_merge( |
|
| 31 | + $this->filters[ '$and' ], |
|
| 32 | 32 | $this->mapExpressions(...func_get_args()) |
| 33 | 33 | ); |
| 34 | 34 | |
@@ -44,8 +44,8 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $this->prepareFilterIndex('$or'); |
| 46 | 46 | |
| 47 | - $this->filters['$or'] = array_merge( |
|
| 48 | - $this->filters['$or'], |
|
| 47 | + $this->filters[ '$or' ] = array_merge( |
|
| 48 | + $this->filters[ '$or' ], |
|
| 49 | 49 | $this->mapExpressions(...func_get_args()) |
| 50 | 50 | ); |
| 51 | 51 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $this->prepareFilterIndex($field); |
| 64 | 64 | |
| 65 | - $this->filters[$field] = $this->operationExpression('$eq', $expression); |
|
| 65 | + $this->filters[ $field ] = $this->operationExpression('$eq', $expression); |
|
| 66 | 66 | |
| 67 | 67 | return $this; |
| 68 | 68 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | $this->prepareFilterIndex($field); |
| 79 | 79 | |
| 80 | - $this->filters[$field] = $this->operationExpression('$ne', $expression); |
|
| 80 | + $this->filters[ $field ] = $this->operationExpression('$ne', $expression); |
|
| 81 | 81 | |
| 82 | 82 | return $this; |
| 83 | 83 | } |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | private function prepareFilterIndex(string $operator) |
| 97 | 97 | { |
| 98 | - if (!isset($this->filters[$operator])) { |
|
| 99 | - $this->filters[$operator] = []; |
|
| 98 | + if (!isset($this->filters[ $operator ])) { |
|
| 99 | + $this->filters[ $operator ] = [ ]; |
|
| 100 | 100 | } |
| 101 | 101 | } |
| 102 | 102 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | private function mapExpressions($expressions): array |
| 109 | 109 | { |
| 110 | 110 | return array_map( |
| 111 | - function ($expression) { |
|
| 111 | + function($expression) { |
|
| 112 | 112 | return $expression instanceof Expression ? $expression->getExpressionFilters() : $expression; |
| 113 | 113 | }, |
| 114 | 114 | func_get_args() |
@@ -125,6 +125,6 @@ discard block |
||
| 125 | 125 | { |
| 126 | 126 | $filter = $expression instanceof Expression ? $expression->getExpressionFilters() : $expression; |
| 127 | 127 | |
| 128 | - return [$operation => $filter]; |
|
| 128 | + return [ $operation => $filter ]; |
|
| 129 | 129 | } |
| 130 | 130 | } |