@@ -210,7 +210,7 @@ |
||
| 210 | 210 | if ($additionalArguments === null) { |
| 211 | 211 | return $callback; |
| 212 | 212 | } |
| 213 | - return function ($item) use ($callback, $additionalArguments) { |
|
| 213 | + return function($item) use ($callback, $additionalArguments) { |
|
| 214 | 214 | $arguments = array_merge([$item], $additionalArguments); |
| 215 | 215 | return call_user_func_array($callback, $arguments); |
| 216 | 216 | }; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function sortByProperty($propertyName) |
| 87 | 87 | { |
| 88 | 88 | |
| 89 | - return $this->sort(function ($itemA, $itemB) use ($propertyName) { |
|
| 89 | + return $this->sort(function($itemA, $itemB) use ($propertyName) { |
|
| 90 | 90 | $a = mp\getValue($itemA, $propertyName, 0); |
| 91 | 91 | $b = mp\getValue($itemB, $propertyName, 0); |
| 92 | 92 | if ($a < $b) { |
@@ -99,12 +99,12 @@ discard block |
||
| 99 | 99 | private function getPropertyComparator($propertyName, $value, $useGetters) |
| 100 | 100 | { |
| 101 | 101 | if ($useGetters) { |
| 102 | - return function ($item) use ($propertyName, $value) { |
|
| 102 | + return function($item) use ($propertyName, $value) { |
|
| 103 | 103 | // NAN used as default because NAN !== NAN |
| 104 | 104 | return mp\getValue($item, $propertyName, NAN) === $value; |
| 105 | 105 | }; |
| 106 | 106 | } else { |
| 107 | - return function ($item) use ($propertyName, $value) { |
|
| 107 | + return function($item) use ($propertyName, $value) { |
|
| 108 | 108 | return isset($item->{$propertyName}) && $item->{$propertyName} === $value; |
| 109 | 109 | }; |
| 110 | 110 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | public function indexByProperty($propertyName) |
| 121 | 121 | { |
| 122 | 122 | $results = []; |
| 123 | - foreach($this->toArray() as $item) { |
|
| 123 | + foreach ($this->toArray() as $item) { |
|
| 124 | 124 | $key = mp\getValue($item, $propertyName); |
| 125 | 125 | if ($key) { |
| 126 | 126 | $results[$key] = $item; |