mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-11-27 04:45:26 +01:00
19 lines
429 B
PHP
19 lines
429 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Tests\Psalm\LaravelPlugin\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasOneThrough;
|
|
|
|
final class Mechanic extends Model {
|
|
protected $table = 'mechanics';
|
|
|
|
/**
|
|
* @psalm-return HasOneThrough<User>
|
|
*/
|
|
public function carOwner(): HasOneThrough
|
|
{
|
|
return $this->hasOneThrough(User::class, Car::class);
|
|
}
|
|
}
|