@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function setUp() |
27 | 27 | { |
28 | - $data = json_decode(file_get_contents(__DIR__ . '/books.json')); |
|
28 | + $data = json_decode(file_get_contents(__DIR__.'/books.json')); |
|
29 | 29 | $this->collection = LinqCollection::from(new ArrayIterator($data)); |
30 | 30 | } |
31 | 31 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function collectionCanBeCreatedFromIterator() |
37 | 37 | { |
38 | - $array = json_decode(file_get_contents(__DIR__ . '/books.json'), true); |
|
38 | + $array = json_decode(file_get_contents(__DIR__.'/books.json'), true); |
|
39 | 39 | $collection = LinqCollection::from(new ArrayIterator($array)); |
40 | 40 | $this->assertSame($array, iterator_to_array($collection)); |
41 | 41 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function collectionCanBeCreatedFromArray() |
48 | 48 | { |
49 | - $array = json_decode(file_get_contents(__DIR__ . '/books.json'), true); |
|
49 | + $array = json_decode(file_get_contents(__DIR__.'/books.json'), true); |
|
50 | 50 | $collection = LinqCollection::from($array); |
51 | 51 | $this->assertSame($array, iterator_to_array($collection)); |
52 | 52 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | public function firstReturnsDefaultIfEmpty() |
90 | 90 | { |
91 | 91 | $default = new \StdClass(); |
92 | - $callable = function ($element) { |
|
92 | + $callable = function($element) { |
|
93 | 93 | return false; |
94 | 94 | }; |
95 | 95 | $this->assertSame($default, $this->collection->firstOrDefault($callable, $default)); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function orderByOrdersSequence() |
112 | 112 | { |
113 | 113 | $collection = LinqCollection::from(['z', 'g', 'a', 'n']); |
114 | - $callable = function ($a, $b) { |
|
114 | + $callable = function($a, $b) { |
|
115 | 115 | return strcmp($a, $b); |
116 | 116 | }; |
117 | 117 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | $this->assertEquals( |
134 | 134 | [ |
135 | - 2 => (object)[ |
|
135 | + 2 => (object) [ |
|
136 | 136 | "author" => "Corets, Eva", |
137 | 137 | "title" => "Maeve Ascendant", |
138 | 138 | "genre" => "Fantasy", |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function whereFilters() |
155 | 155 | { |
156 | - $callable = function (StdClass $book) : bool { |
|
156 | + $callable = function(StdClass $book) : bool { |
|
157 | 157 | return $book->genre === 'Romance'; |
158 | 158 | }; |
159 | 159 | |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | $this->assertEquals( |
163 | 163 | [ |
164 | - 5 => (object)[ |
|
164 | + 5 => (object) [ |
|
165 | 165 | "author" => "Randall, Cynthia", |
166 | 166 | "title" => "Lover Birds", |
167 | 167 | "genre" => "Romance", |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | . ' ruffled.', |
172 | 172 | "id" => "58339e95d530e" |
173 | 173 | ], |
174 | - 6 => (object)[ |
|
174 | + 6 => (object) [ |
|
175 | 175 | "author" => "Thurman, Paula", |
176 | 176 | "title" => "Splish Splash", |
177 | 177 | "genre" => "Romance", |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public function select() |
193 | 193 | { |
194 | - $callable = function (StdClass $book) : array { |
|
194 | + $callable = function(StdClass $book) : array { |
|
195 | 195 | return [ |
196 | 196 | 'id' => $book->id, |
197 | 197 | 'genre' => $book->genre, |