fix: move factory() to 6.x/7.x stubs

This commit is contained in:
Claas Augner 2021-07-09 22:37:16 +02:00
parent 8ac575bbfa
commit 72a06f29b5
3 changed files with 50 additions and 25 deletions

25
stubs/6/helpers.stubphp Normal file
View File

@ -0,0 +1,25 @@
<?php
/**
* @template TModel of \Illuminate\Database\Eloquent\Model
* @template TNameOrCountOrNull of string|int|null
* @template TCountOrNull of int|null
*
* @param class-string<TModel> $modelClassName
* @param TNameOrCountOrNull $nameOrCount
* @param TCountOrNull $count
*
* @return (
TCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
: (
TNameOrCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
)
)
*/
function factory(string $modelClassName, $nameOrCount = null, $count = null)
{
}

25
stubs/7/helpers.stubphp Normal file
View File

@ -0,0 +1,25 @@
<?php
/**
* @template TModel of \Illuminate\Database\Eloquent\Model
* @template TNameOrCountOrNull of string|int|null
* @template TCountOrNull of int|null
*
* @param class-string<TModel> $modelClassName
* @param TNameOrCountOrNull $nameOrCount
* @param TCountOrNull $count
*
* @return (
TCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
: (
TNameOrCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
)
)
*/
function factory(string $modelClassName, $nameOrCount = null, $count = null)
{
}

View File

@ -1,30 +1,5 @@
<?php <?php
/**
* @template TModel of \Illuminate\Database\Eloquent\Model
* @template TNameOrCountOrNull of string|int|null
* @template TCountOrNull of int|null
*
* @param class-string<TModel> $modelClassName
* @param TNameOrCountOrNull $nameOrCount
* @param TCountOrNull $count
*
* @return (
TCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
: (
TNameOrCountOrNull is int
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
)
)
*/
function factory(string $modelClassName, $nameOrCount = null, $count = null)
{
}
/** /**
* Return a new response from the application. * Return a new response from the application.
* *