mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-27 04:45:26 +01:00
21 lines
420 B
PHP
21 lines
420 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Psalm\LaravelPlugin\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
final class Video extends Model
|
|
{
|
|
/**
|
|
* Get all of the video's comments.
|
|
* @psalm-return MorphMany<Comment>
|
|
*/
|
|
public function comments(): MorphMany
|
|
{
|
|
return $this->morphMany(Comment::class, 'commentable');
|
|
}
|
|
}
|