psalm-plugin-laravel/tests/Models/Video.php

21 lines
420 B
PHP
Raw Normal View History

2022-01-19 23:05:35 +01:00
<?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');
}
}