@@ -126,84 +126,84 @@ discard block |
||
| 126 | 126 | return [ |
| 127 | 127 | [ |
| 128 | 128 | 'tokens' => ['=', '==', 'eq'], |
| 129 | - 'closure' => function ($item, $property, $value) { |
|
| 129 | + 'closure' => function($item, $property, $value) { |
|
| 130 | 130 | return $item[$property] == $value[0]; |
| 131 | 131 | }, |
| 132 | 132 | ], |
| 133 | 133 | |
| 134 | 134 | [ |
| 135 | 135 | 'tokens' => ['===', 'i'], |
| 136 | - 'closure' => function ($item, $property, $value) { |
|
| 136 | + 'closure' => function($item, $property, $value) { |
|
| 137 | 137 | return $item[$property] === $value[0]; |
| 138 | 138 | }, |
| 139 | 139 | ], |
| 140 | 140 | |
| 141 | 141 | [ |
| 142 | 142 | 'tokens' => ['!=', 'ne'], |
| 143 | - 'closure' => function ($item, $property, $value) { |
|
| 143 | + 'closure' => function($item, $property, $value) { |
|
| 144 | 144 | return $item[$property] != $value[0]; |
| 145 | 145 | }, |
| 146 | 146 | ], |
| 147 | 147 | |
| 148 | 148 | [ |
| 149 | 149 | 'tokens' => ['!==', 'ni'], |
| 150 | - 'closure' => function ($item, $property, $value) { |
|
| 150 | + 'closure' => function($item, $property, $value) { |
|
| 151 | 151 | return $item[$property] !== $value[0]; |
| 152 | 152 | }, |
| 153 | 153 | ], |
| 154 | 154 | |
| 155 | 155 | [ |
| 156 | 156 | 'tokens' => ['<', 'lt'], |
| 157 | - 'closure' => function ($item, $property, $value) { |
|
| 157 | + 'closure' => function($item, $property, $value) { |
|
| 158 | 158 | return $item[$property] < $value[0]; |
| 159 | 159 | }, |
| 160 | 160 | ], |
| 161 | 161 | |
| 162 | 162 | [ |
| 163 | 163 | 'tokens' => ['>', 'gt'], |
| 164 | - 'closure' => function ($item, $property, $value) { |
|
| 164 | + 'closure' => function($item, $property, $value) { |
|
| 165 | 165 | return $item[$property] > $value[0]; |
| 166 | 166 | }, |
| 167 | 167 | ], |
| 168 | 168 | |
| 169 | 169 | [ |
| 170 | 170 | 'tokens' => ['<=', 'lte'], |
| 171 | - 'closure' => function ($item, $property, $value) { |
|
| 171 | + 'closure' => function($item, $property, $value) { |
|
| 172 | 172 | return $item[$property] <= $value[0]; |
| 173 | 173 | }, |
| 174 | 174 | ], |
| 175 | 175 | |
| 176 | 176 | [ |
| 177 | 177 | 'tokens' => ['>=', 'gte'], |
| 178 | - 'closure' => function ($item, $property, $value) { |
|
| 178 | + 'closure' => function($item, $property, $value) { |
|
| 179 | 179 | return $item[$property] >= $value[0]; |
| 180 | 180 | }, |
| 181 | 181 | ], |
| 182 | 182 | |
| 183 | 183 | [ |
| 184 | 184 | 'tokens' => ['in', 'contains'], |
| 185 | - 'closure' => function ($item, $property, $value) { |
|
| 185 | + 'closure' => function($item, $property, $value) { |
|
| 186 | 186 | return \in_array($item[$property], (array) $value, true); |
| 187 | 187 | }, |
| 188 | 188 | ], |
| 189 | 189 | |
| 190 | 190 | [ |
| 191 | 191 | 'tokens' => ['not-in', 'not-contains'], |
| 192 | - 'closure' => function ($item, $property, $value) { |
|
| 192 | + 'closure' => function($item, $property, $value) { |
|
| 193 | 193 | return !\in_array($item[$property], (array) $value, true); |
| 194 | 194 | }, |
| 195 | 195 | ], |
| 196 | 196 | |
| 197 | 197 | [ |
| 198 | 198 | 'tokens' => ['between'], |
| 199 | - 'closure' => function ($item, $property, $value) { |
|
| 199 | + 'closure' => function($item, $property, $value) { |
|
| 200 | 200 | return ($item[$property] >= $value[0] && $item[$property] <= $value[1]); |
| 201 | 201 | }, |
| 202 | 202 | ], |
| 203 | 203 | |
| 204 | 204 | [ |
| 205 | 205 | 'tokens' => ['not-between'], |
| 206 | - 'closure' => function ($item, $property, $value) { |
|
| 206 | + 'closure' => function($item, $property, $value) { |
|
| 207 | 207 | return ($item[$property] < $value[0] || $item[$property] > $value[1]); |
| 208 | 208 | }, |
| 209 | 209 | ], |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | |
| 595 | 595 | foreach ($operators as $entry) { |
| 596 | 596 | if (\in_array($comparisonOperator, $entry['tokens'])) { |
| 597 | - $closure = function ($item) use ($entry, $property, $value) { |
|
| 597 | + $closure = function($item) use ($entry, $property, $value) { |
|
| 598 | 598 | $item = (array) $item; |
| 599 | 599 | |
| 600 | 600 | if (!\array_key_exists($property, $item)) { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $segments = \array_filter( |
| 95 | 95 | $matches, |
| 96 | - function ($match) { |
|
| 96 | + function($match) { |
|
| 97 | 97 | return (\mb_strlen($match, 'UTF-8') > 0); |
| 98 | 98 | } |
| 99 | 99 | ); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | \implode( |
| 130 | 130 | '.', |
| 131 | 131 | \array_map( |
| 132 | - function ($segment) { |
|
| 132 | + function($segment) { |
|
| 133 | 133 | return static::wrapSegmentKey($segment); |
| 134 | 134 | }, |
| 135 | 135 | $segments |