Completed
Push — master ( f51ae3...2a4c48 )
by Alessandro
09:30
created
src/Expression.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 
103 103
     /**
104 104
      * @param string $operation
105
-     * @param mixed  $value
105
+     * @param string  $value
106 106
      *
107 107
      * @return array
108 108
      */
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
      */
41 41
     private function prepareFilterIndex(string $operator)
42 42
     {
43
-        if (!isset($this->filters[$operator])) {
44
-            $this->filters[$operator] = [];
43
+        if (!isset($this->filters[ $operator ])) {
44
+            $this->filters[ $operator ] = [ ];
45 45
         }
46 46
     }
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     private function mapExpressions($expressions): array
54 54
     {
55 55
         return array_map(
56
-            function ($expression) {
56
+            function($expression) {
57 57
                 return $expression instanceof Expression ? $expression->getExpressionFilters() : $expression;
58 58
             },
59 59
             func_get_args()
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $this->prepareFilterIndex('$or');
79 79
 
80
-        $this->filters['$or'] = array_merge(
81
-            $this->filters['$or'],
80
+        $this->filters[ '$or' ] = array_merge(
81
+            $this->filters[ '$or' ],
82 82
             $this->mapExpressions(...func_get_args())
83 83
         );
84 84
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $this->prepareFilterIndex($field);
97 97
 
98
-        $this->filters[$field] = $this->operationExpression('$eq', $value);
98
+        $this->filters[ $field ] = $this->operationExpression('$eq', $value);
99 99
 
100 100
         return $this;
101 101
     }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     private function operationExpression(string $operation, $value): array
110 110
     {
111
-        return [$operation => $value];
111
+        return [ $operation => $value ];
112 112
     }
113 113
 
114 114
     /**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $this->prepareFilterIndex($field);
123 123
 
124
-        $this->filters[$field] = $this->operationExpression('$ne', $value);
124
+        $this->filters[ $field ] = $this->operationExpression('$ne', $value);
125 125
 
126 126
         return $this;
127 127
     }
Please login to merge, or discard this patch.