Passed
Branch master (6a2411)
by Guillermo A.
05:35
created
Category
src/Common/Collection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function sortBy(string $fieldName): CollectionInterface
37 37
     {
38 38
         $results = $this->items;
39
-        usort($results, function ($item1, $item2) use ($fieldName) {
39
+        usort($results, function($item1, $item2) use ($fieldName) {
40 40
             return $item1[$fieldName] <=> $item2[$fieldName];
41 41
         });
42 42
         return new static($results);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function toArray(): array
78 78
     {
79
-        return array_map(function ($value) {
79
+        return array_map(function($value) {
80 80
             return $value instanceof ArrayableInterface ? $value->toArray() : $value;
81 81
         }, $this->items);
82 82
     }
Please login to merge, or discard this patch.
tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php require dirname(__DIR__) . '/vendor/autoload.php';
1
+<?php require dirname(__DIR__).'/vendor/autoload.php';
Please login to merge, or discard this patch.
tests/Common/CollectionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     public function testFilter()
112 112
     {
113 113
         $collection = new Collection([1, 2, 3]);
114
-        $filteredCollection = $collection->filter(function ($var) {
114
+        $filteredCollection = $collection->filter(function($var) {
115 115
             return($var & 1);
116 116
         });
117 117
         $this->assertCount(2, $filteredCollection);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function testMap()
121 121
     {
122 122
         $collection = new Collection([1, 2, 3]);
123
-        $mappedCollection = $collection->map(function ($var) {
123
+        $mappedCollection = $collection->map(function($var) {
124 124
             return($var + 3);
125 125
         });
126 126
         $this->assertSame([4, 5, 6], $mappedCollection->all());
Please login to merge, or discard this patch.