@@ -26,7 +26,7 @@ |
||
26 | 26 | ] |
27 | 27 | ); |
28 | 28 | |
29 | - $selector = function (array $item) : array { |
|
29 | + $selector = function(array $item) : array { |
|
30 | 30 | return ['id' => $item['id']]; |
31 | 31 | }; |
32 | 32 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function setUp() |
26 | 26 | { |
27 | - $data = json_decode(file_get_contents(__DIR__ . '/books.json')); |
|
27 | + $data = json_decode(file_get_contents(__DIR__.'/books.json')); |
|
28 | 28 | $this->collection = LinqCollection::from(new ArrayIterator($data)); |
29 | 29 | } |
30 | 30 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function collectionCanBeCreatedFromIterator() |
36 | 36 | { |
37 | - $array = json_decode(file_get_contents(__DIR__ . '/books.json'), true); |
|
37 | + $array = json_decode(file_get_contents(__DIR__.'/books.json'), true); |
|
38 | 38 | $collection = LinqCollection::from(new ArrayIterator($array)); |
39 | 39 | $this->assertSame($array, iterator_to_array($collection)); |
40 | 40 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function collectionCanBeCreatedFromArray() |
47 | 47 | { |
48 | - $array = json_decode(file_get_contents(__DIR__ . '/books.json'), true); |
|
48 | + $array = json_decode(file_get_contents(__DIR__.'/books.json'), true); |
|
49 | 49 | $collection = LinqCollection::from($array); |
50 | 50 | $this->assertSame($array, iterator_to_array($collection)); |
51 | 51 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | $this->assertEquals( |
84 | 84 | [ |
85 | - 2 => (object)[ |
|
85 | + 2 => (object) [ |
|
86 | 86 | "author" => "Corets, Eva", |
87 | 87 | "title" => "Maeve Ascendant", |
88 | 88 | "genre" => "Fantasy", |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function whereFilters() |
105 | 105 | { |
106 | - $callable = function (StdClass $book) : bool { |
|
106 | + $callable = function(StdClass $book) : bool { |
|
107 | 107 | return $book->genre === 'Romance'; |
108 | 108 | }; |
109 | 109 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | $this->assertEquals( |
113 | 113 | [ |
114 | - 5 => (object)[ |
|
114 | + 5 => (object) [ |
|
115 | 115 | "author" => "Randall, Cynthia", |
116 | 116 | "title" => "Lover Birds", |
117 | 117 | "genre" => "Romance", |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | . ' ruffled.', |
122 | 122 | "id" => "58339e95d530e" |
123 | 123 | ], |
124 | - 6 => (object)[ |
|
124 | + 6 => (object) [ |
|
125 | 125 | "author" => "Thurman, Paula", |
126 | 126 | "title" => "Splish Splash", |
127 | 127 | "genre" => "Romance", |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function select() |
143 | 143 | { |
144 | - $callable = function (StdClass $book) : array { |
|
144 | + $callable = function(StdClass $book) : array { |
|
145 | 145 | return [ |
146 | 146 | 'id' => $book->id, |
147 | 147 | 'genre' => $book->genre, |
@@ -82,7 +82,7 @@ |
||
82 | 82 | */ |
83 | 83 | public function firstOrDefault(callable $predicate = null, $defaultValue = null) |
84 | 84 | { |
85 | - $predicate = $predicate ?? function ($item) : bool { |
|
85 | + $predicate = $predicate ?? function($item) : bool { |
|
86 | 86 | return true; |
87 | 87 | }; |
88 | 88 | foreach ($this->traversable as $item) { |