mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-12-02 09:37:47 +01:00
31 lines
832 B
Plaintext
31 lines
832 B
Plaintext
<?php
|
|
|
|
namespace Illuminate\Database\Eloquent\Relations;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
|
|
/**
|
|
* @template TRelatedModel of Model
|
|
* @template-extends Relation<TRelatedModel>
|
|
* @mixin \Illuminate\Database\Eloquent\Builder<TRelatedModel>
|
|
*/
|
|
abstract class HasOneOrMany extends Relation
|
|
{
|
|
/**
|
|
* @param array $attributes
|
|
* @param array $values
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @psalm-return TRelatedModel
|
|
*/
|
|
public function firstOrNew(array $attributes = [], array $values = []) { }
|
|
|
|
/**
|
|
* @param array $attributes
|
|
* @param array $values
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @psalm-return TRelatedModel
|
|
*/
|
|
public function firstOrCreate(array $attributes = [], array $values = []) { }
|
|
}
|