|
187 | 187 | assertType('User', $user); |
188 | 188 | })); |
189 | 189 |
|
190 | | -assertType('Illuminate\Support\Collection<int, array(string)>', $collection::make([['string']]) |
| 190 | +assertType('Illuminate\Support\Collection<int, array{string}>', $collection::make([['string']]) |
191 | 191 | ->eachSpread(function ($int, $string) { |
192 | 192 | // assertType('int', $int); |
193 | 193 | // assertType('int', $string); |
194 | 194 |
|
195 | 195 | return null; |
196 | 196 | })); |
197 | | -assertType('Illuminate\Support\Collection<int, array(int, string)>', $collection::make([[1, 'string']]) |
| 197 | +assertType('Illuminate\Support\Collection<int, array{int, string}>', $collection::make([[1, 'string']]) |
198 | 198 | ->eachSpread(function ($int, $string) { |
199 | 199 | // assertType('int', $int); |
200 | 200 | // assertType('int', $string); |
|
211 | 211 | assertType('Illuminate\Support\Collection<string, string>', $collection::make(['string' => 'string'])->except(['string'])); |
212 | 212 | assertType('Illuminate\Support\Collection<int, User>', $collection->except([1])); |
213 | 213 | assertType('Illuminate\Support\Collection<int, string>', $collection::make(['string']) |
214 | | - ->except($collection->keys()->toArray())); |
| 214 | + ->except([1])); |
215 | 215 |
|
216 | 216 | assertType('Illuminate\Support\Collection<int, User>', $collection->filter()); |
217 | 217 | assertType('Illuminate\Support\Collection<int, User>', $collection->filter(function ($user) { |
|
311 | 311 | return 'string'; |
312 | 312 | })); |
313 | 313 |
|
314 | | -assertType("Illuminate\Support\Collection<int, array('string' => string)>", $collection::make([['string' => 'string']]) |
| 314 | +assertType("Illuminate\Support\Collection<int, array{string: string}>", $collection::make([['string' => 'string']]) |
315 | 315 | ->where('string')); |
316 | | -assertType("Illuminate\Support\Collection<int, array('string' => string)>", $collection::make([['string' => 'string']]) |
| 316 | +assertType("Illuminate\Support\Collection<int, array{string: string}>", $collection::make([['string' => 'string']]) |
317 | 317 | ->where('string', '=', 'string')); |
318 | | -assertType("Illuminate\Support\Collection<int, array('string' => string)>", $collection::make([['string' => 'string']]) |
| 318 | +assertType("Illuminate\Support\Collection<int, array{string: string}>", $collection::make([['string' => 'string']]) |
319 | 319 | ->where('string', 'string')); |
320 | 320 |
|
321 | 321 | assertType('Illuminate\Support\Collection<int, User>', $collection->whereNull()); |
|
324 | 324 | assertType('Illuminate\Support\Collection<int, User>', $collection->whereNotNull()); |
325 | 325 | assertType('Illuminate\Support\Collection<int, User>', $collection->whereNotNull('foo')); |
326 | 326 |
|
327 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 327 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
328 | 328 | ->whereStrict('string', 2)); |
329 | 329 |
|
330 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 330 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
331 | 331 | ->whereIn('string', [2])); |
332 | 332 |
|
333 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 333 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
334 | 334 | ->whereInStrict('string', [2])); |
335 | 335 |
|
336 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 336 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
337 | 337 | ->whereBetween('string', [1, 3])); |
338 | 338 |
|
339 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 339 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
340 | 340 | ->whereNotBetween('string', [1, 3])); |
341 | 341 |
|
342 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 342 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
343 | 343 | ->whereNotIn('string', [2])); |
344 | 344 |
|
345 | | -assertType("Illuminate\Support\Collection<int, array('string' => int)>", $collection::make([['string' => 2]]) |
| 345 | +assertType("Illuminate\Support\Collection<int, array{string: int}>", $collection::make([['string' => 2]]) |
346 | 346 | ->whereNotInStrict('string', [2])); |
347 | 347 |
|
348 | 348 | assertType('Illuminate\Support\Collection<int, int|User>', $collection::make([new User, 1]) |
|
503 | 503 | assertType('Illuminate\Support\Collection<string, string>', $collection::make(['string' => 'string'])->only(['string'])); |
504 | 504 | assertType('Illuminate\Support\Collection<int, User>', $collection->only([1])); |
505 | 505 | assertType('Illuminate\Support\Collection<int, string>', $collection::make(['string']) |
506 | | - ->only($collection->keys()->toArray())); |
| 506 | + ->only([1])); |
507 | 507 |
|
508 | 508 | assertType('Illuminate\Support\Collection<int, User>', $collection->forPage(1, 2)); |
509 | 509 |
|
|
0 commit comments