Completed
Push — master ( a1b74b...0e2b97 )
by Vitaliy
02:28
created
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.