Skip to content

Commit ceadf6e

Browse files
authored
Uses "phpstan/phpstan": "^1.0" (#39479)
1 parent ec8f88b commit ceadf6e

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"mockery/mockery": "^1.4.4",
9090
"orchestra/testbench-core": "^7.0",
9191
"pda/pheanstalk": "^4.0",
92-
"phpstan/phpstan": "^0.12.94",
92+
"phpstan/phpstan": "^1.0",
9393
"predis/predis": "^1.1.2",
9494
"phpunit/phpunit": "^9.5.8",
9595
"symfony/cache": "^6.0"

types/Database/Eloquent/Factories/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class UserFactory extends Factory
1111
/**
1212
* The name of the factory's corresponding model.
1313
*
14-
* @var string
14+
* @var class-string<User>
1515
*/
1616
protected $model = User::class;
1717

types/Support/Collection.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@
187187
assertType('User', $user);
188188
}));
189189

190-
assertType('Illuminate\Support\Collection<int, array(string)>', $collection::make([['string']])
190+
assertType('Illuminate\Support\Collection<int, array{string}>', $collection::make([['string']])
191191
->eachSpread(function ($int, $string) {
192192
// assertType('int', $int);
193193
// assertType('int', $string);
194194

195195
return null;
196196
}));
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']])
198198
->eachSpread(function ($int, $string) {
199199
// assertType('int', $int);
200200
// assertType('int', $string);
@@ -211,7 +211,7 @@
211211
assertType('Illuminate\Support\Collection<string, string>', $collection::make(['string' => 'string'])->except(['string']));
212212
assertType('Illuminate\Support\Collection<int, User>', $collection->except([1]));
213213
assertType('Illuminate\Support\Collection<int, string>', $collection::make(['string'])
214-
->except($collection->keys()->toArray()));
214+
->except([1]));
215215

216216
assertType('Illuminate\Support\Collection<int, User>', $collection->filter());
217217
assertType('Illuminate\Support\Collection<int, User>', $collection->filter(function ($user) {
@@ -311,11 +311,11 @@
311311
return 'string';
312312
}));
313313

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']])
315315
->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']])
317317
->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']])
319319
->where('string', 'string'));
320320

321321
assertType('Illuminate\Support\Collection<int, User>', $collection->whereNull());
@@ -324,25 +324,25 @@
324324
assertType('Illuminate\Support\Collection<int, User>', $collection->whereNotNull());
325325
assertType('Illuminate\Support\Collection<int, User>', $collection->whereNotNull('foo'));
326326

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]])
328328
->whereStrict('string', 2));
329329

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]])
331331
->whereIn('string', [2]));
332332

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]])
334334
->whereInStrict('string', [2]));
335335

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]])
337337
->whereBetween('string', [1, 3]));
338338

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]])
340340
->whereNotBetween('string', [1, 3]));
341341

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]])
343343
->whereNotIn('string', [2]));
344344

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]])
346346
->whereNotInStrict('string', [2]));
347347

348348
assertType('Illuminate\Support\Collection<int, int|User>', $collection::make([new User, 1])
@@ -503,7 +503,7 @@
503503
assertType('Illuminate\Support\Collection<string, string>', $collection::make(['string' => 'string'])->only(['string']));
504504
assertType('Illuminate\Support\Collection<int, User>', $collection->only([1]));
505505
assertType('Illuminate\Support\Collection<int, string>', $collection::make(['string'])
506-
->only($collection->keys()->toArray()));
506+
->only([1]));
507507

508508
assertType('Illuminate\Support\Collection<int, User>', $collection->forPage(1, 2));
509509

0 commit comments

Comments
 (0)