@@ -123,84 +123,84 @@ discard block |
||
123 | 123 | return [ |
124 | 124 | [ |
125 | 125 | 'tokens' => ['=', '==', 'eq'], |
126 | - 'closure' => function ($item, $property, $value) { |
|
126 | + 'closure' => function($item, $property, $value) { |
|
127 | 127 | return $item[$property] == $value[0]; |
128 | 128 | }, |
129 | 129 | ], |
130 | 130 | |
131 | 131 | [ |
132 | 132 | 'tokens' => ['===', 'i'], |
133 | - 'closure' => function ($item, $property, $value) { |
|
133 | + 'closure' => function($item, $property, $value) { |
|
134 | 134 | return $item[$property] === $value[0]; |
135 | 135 | }, |
136 | 136 | ], |
137 | 137 | |
138 | 138 | [ |
139 | 139 | 'tokens' => ['!=', 'ne'], |
140 | - 'closure' => function ($item, $property, $value) { |
|
140 | + 'closure' => function($item, $property, $value) { |
|
141 | 141 | return $item[$property] != $value[0]; |
142 | 142 | }, |
143 | 143 | ], |
144 | 144 | |
145 | 145 | [ |
146 | 146 | 'tokens' => ['!==', 'ni'], |
147 | - 'closure' => function ($item, $property, $value) { |
|
147 | + 'closure' => function($item, $property, $value) { |
|
148 | 148 | return $item[$property] !== $value[0]; |
149 | 149 | }, |
150 | 150 | ], |
151 | 151 | |
152 | 152 | [ |
153 | 153 | 'tokens' => ['<', 'lt'], |
154 | - 'closure' => function ($item, $property, $value) { |
|
154 | + 'closure' => function($item, $property, $value) { |
|
155 | 155 | return $item[$property] < $value[0]; |
156 | 156 | }, |
157 | 157 | ], |
158 | 158 | |
159 | 159 | [ |
160 | 160 | 'tokens' => ['>', 'gt'], |
161 | - 'closure' => function ($item, $property, $value) { |
|
161 | + 'closure' => function($item, $property, $value) { |
|
162 | 162 | return $item[$property] > $value[0]; |
163 | 163 | }, |
164 | 164 | ], |
165 | 165 | |
166 | 166 | [ |
167 | 167 | 'tokens' => ['<=', 'lte'], |
168 | - 'closure' => function ($item, $property, $value) { |
|
168 | + 'closure' => function($item, $property, $value) { |
|
169 | 169 | return $item[$property] <= $value[0]; |
170 | 170 | }, |
171 | 171 | ], |
172 | 172 | |
173 | 173 | [ |
174 | 174 | 'tokens' => ['>=', 'gte'], |
175 | - 'closure' => function ($item, $property, $value) { |
|
175 | + 'closure' => function($item, $property, $value) { |
|
176 | 176 | return $item[$property] >= $value[0]; |
177 | 177 | }, |
178 | 178 | ], |
179 | 179 | |
180 | 180 | [ |
181 | 181 | 'tokens' => ['in', 'contains'], |
182 | - 'closure' => function ($item, $property, $value) { |
|
182 | + 'closure' => function($item, $property, $value) { |
|
183 | 183 | return \in_array($item[$property], (array) $value, true); |
184 | 184 | }, |
185 | 185 | ], |
186 | 186 | |
187 | 187 | [ |
188 | 188 | 'tokens' => ['not-in', 'not-contains'], |
189 | - 'closure' => function ($item, $property, $value) { |
|
189 | + 'closure' => function($item, $property, $value) { |
|
190 | 190 | return !\in_array($item[$property], (array) $value, true); |
191 | 191 | }, |
192 | 192 | ], |
193 | 193 | |
194 | 194 | [ |
195 | 195 | 'tokens' => ['between'], |
196 | - 'closure' => function ($item, $property, $value) { |
|
196 | + 'closure' => function($item, $property, $value) { |
|
197 | 197 | return ($item[$property] >= $value[0] && $item[$property] <= $value[1]); |
198 | 198 | }, |
199 | 199 | ], |
200 | 200 | |
201 | 201 | [ |
202 | 202 | 'tokens' => ['not-between'], |
203 | - 'closure' => function ($item, $property, $value) { |
|
203 | + 'closure' => function($item, $property, $value) { |
|
204 | 204 | return ($item[$property] < $value[0] || $item[$property] > $value[1]); |
205 | 205 | }, |
206 | 206 | ], |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | $segments = \array_filter( |
306 | 306 | $matches, |
307 | - function ($match) { |
|
307 | + function($match) { |
|
308 | 308 | return (\mb_strlen($match, 'UTF-8') > 0); |
309 | 309 | } |
310 | 310 | ); |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | |
713 | 713 | foreach ($operators as $entry) { |
714 | 714 | if (\in_array($comparisonOperator, $entry['tokens'])) { |
715 | - $closure = function ($item) use ($entry, $property, $value) { |
|
715 | + $closure = function($item) use ($entry, $property, $value) { |
|
716 | 716 | $item = (array) $item; |
717 | 717 | |
718 | 718 | if (!array_key_exists($property, $item)) { |