@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | public function sortByProperty($propertyName) |
85 | 85 | { |
86 | 86 | |
87 | - return $this->sort(function ($itemA, $itemB) use ($propertyName) { |
|
87 | + return $this->sort(function($itemA, $itemB) use ($propertyName) { |
|
88 | 88 | $a = mp\getValue($itemA, $propertyName, 0); |
89 | 89 | $b = mp\getValue($itemB, $propertyName, 0); |
90 | 90 | if ($a < $b) { |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | private function getPropertyComparator($propertyName, $value, $useGetters) |
98 | 98 | { |
99 | 99 | if ($useGetters) { |
100 | - return function ($item) use ($propertyName, $value) { |
|
100 | + return function($item) use ($propertyName, $value) { |
|
101 | 101 | // NAN used as default because NAN !== NAN |
102 | 102 | return mp\getValue($item, $propertyName, NAN) === $value; |
103 | 103 | }; |
104 | 104 | } else { |
105 | - return function ($item) use ($propertyName, $value) { |
|
105 | + return function($item) use ($propertyName, $value) { |
|
106 | 106 | return isset($item->{$propertyName}) && $item->{$propertyName} === $value; |
107 | 107 | }; |
108 | 108 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | foreach ($items as &$item) { |
180 | 180 | $item = [$index++, $item]; |
181 | 181 | } |
182 | - usort($items, function ($a, $b) use ($compareFunction) { |
|
182 | + usort($items, function($a, $b) use ($compareFunction) { |
|
183 | 183 | $result = call_user_func($compareFunction, $a[1], $b[1]); |
184 | 184 | return $result == 0 ? $a[0] - $b[0] : $result; |
185 | 185 | }); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | if ($additionalArguments === null) { |
214 | 214 | return $callback; |
215 | 215 | } |
216 | - return function ($item) use ($callback, $additionalArguments) { |
|
216 | + return function($item) use ($callback, $additionalArguments) { |
|
217 | 217 | $arguments = array_merge([$item], $additionalArguments); |
218 | 218 | return call_user_func_array($callback, $arguments); |
219 | 219 | }; |