Completed
Push — master ( e7d171...e89ccd )
by Vitaliy
06:33
created
src/CollectionReadTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
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
         };
Please login to merge, or discard this patch.
src/Extended/ObjectCollectionTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.