@@ -1,1 +1,1 @@ |
||
1 | -<?php require dirname(__DIR__) . '/vendor/autoload.php'; |
|
1 | +<?php require dirname(__DIR__).'/vendor/autoload.php'; |
@@ -111,7 +111,7 @@ discard block |
||
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 |
||
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()); |
@@ -45,9 +45,9 @@ |
||
45 | 45 | return $default; |
46 | 46 | } |
47 | 47 | |
48 | - /** |
|
49 | - * {@inheritDoc} |
|
50 | - */ |
|
48 | + /** |
|
49 | + * {@inheritDoc} |
|
50 | + */ |
|
51 | 51 | final public function set(mixed $offset, mixed $value): void |
52 | 52 | { |
53 | 53 | $this->offsetSet($offset, $value); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | public function sortBy(string $fieldName, bool $reverse = false): CollectionInterface |
53 | 53 | { |
54 | 54 | $results = $this->items; |
55 | - usort($results, static function ($item1, $item2) use ($fieldName) { |
|
55 | + usort($results, static function($item1, $item2) use ($fieldName) { |
|
56 | 56 | return $item1[$fieldName] <=> $item2[$fieldName]; |
57 | 57 | }); |
58 | 58 | if ($reverse) { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function toArray(): array |
118 | 118 | { |
119 | - return array_map(static function ($value) { |
|
119 | + return array_map(static function($value) { |
|
120 | 120 | return $value instanceof ArrayableInterface ? $value->toArray() : $value; |
121 | 121 | }, $this->items); |
122 | 122 | } |