mirror of
https://github.com/flarum/framework.git
synced 2025-02-14 15:42:53 +08:00
fix(regression): phpstan errors
This commit is contained in:
parent
a81d13e26c
commit
4dce4d40a3
|
@ -72,13 +72,14 @@ class Collection extends BaseCollection
|
|||
$relation = reset($relation);
|
||||
}
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
$models->filter(fn ($model) => ! is_null($model) && ! $model->relationLoaded($name))->load($relation);
|
||||
|
||||
if (empty($path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$models = $models->pluck($name)->where(fn (mixed $relation) => $relation !== null);
|
||||
$models = $models->pluck($name)->filter();
|
||||
|
||||
if ($models->first() instanceof \Illuminate\Support\Collection) {
|
||||
$models = $models->collapse();
|
||||
|
|
Loading…
Reference in New Issue
Block a user