Completed
Push — master ( e89ccd...3d6e36 )
by Vitaliy
05:44 queued 03:07
created
src/Extended/ObjectCollectionTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/CollectionReadTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         };
Please login to merge, or discard this patch.