psalm-plugin-laravel/stubs/HasOne.stubphp
2021-06-21 17:38:17 -07:00

25 lines
664 B
Plaintext

<?php
namespace Illuminate\Database\Eloquent\Relations;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Relations\Concerns\SupportsDefaultModels;
/**
* @template TRelatedModel of Model
* @template-extends HasOneOrMany<TRelatedModel>
* @mixin \Illuminate\Database\Eloquent\Builder<TRelatedModel>
*/
class HasOne extends HasOneOrMany
{
use SupportsDefaultModels;
/**
* @param \Illuminate\Database\Eloquent\Model $parent
* @return \Illuminate\Database\Eloquent\Model
* @psalm-return TRelatedModel
*/
public function newRelatedInstanceFor(Model $parent) { }
}