Skip to content

Commit fab7419

Browse files
committed
chore: phpstan level 5
1 parent 6e6a82f commit fab7419

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

phpstan.neon.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 4
5+
level: 5
66
paths:
77
- src
88
- config

src/Models/SnapshotCollection.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
use EriBloo\LaravelModelSnapshots\Contracts\Snapshot as SnapshotContract;
88
use Illuminate\Database\Eloquent\Collection;
99

10+
/**
11+
* @extends Collection<int, Snapshot>
12+
*/
1013
class SnapshotCollection extends Collection
1114
{
12-
public function toModels(bool $fillExcludedAttributes = false): SnapshotCollection
15+
public function toModels(bool $fillExcludedAttributes = false): Collection
1316
{
1417
if ($fillExcludedAttributes) {
1518
$this->loadMissing('subject');
1619
}
1720

18-
return new SnapshotCollection(
21+
return new Collection(
1922
$this->map(
2023
fn (SnapshotContract $snapshot) => $snapshot->toModel($fillExcludedAttributes)
2124
)

0 commit comments

Comments
 (0)