Closed mshamaseen closed 1 year ago
UPD: a new error (v2.5.0) is like:
ERROR: InvalidReturnStatement - app/Models/User.php:49:16 - The inferred type 'Illuminate\Database\Eloquent\Builder<TRelatedModel:Illuminate\Database\Eloquent\Relations\MorphMany as Illuminate\Database\Eloquent\Model>' does not match the declared return type 'Illuminate\Database\Eloquent\Relations\MorphMany' for App\Models\User::notifications (see https://psalm.dev/128)
return $this->morphMany(Notification::class, 'notifiable')
->latest();
Describe the bug psalm returns
InvalidReturnType
on:the full error is:
Impacted Versions