Skip to content

Commit 72a06f2

Browse files
committed
fix: move factory() to 6.x/7.x stubs
1 parent 8ac575b commit 72a06f2

File tree

3 files changed

+50
-25
lines changed

3 files changed

+50
-25
lines changed

stubs/6/helpers.stubphp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* @template TModel of \Illuminate\Database\Eloquent\Model
5+
* @template TNameOrCountOrNull of string|int|null
6+
* @template TCountOrNull of int|null
7+
*
8+
* @param class-string<TModel> $modelClassName
9+
* @param TNameOrCountOrNull $nameOrCount
10+
* @param TCountOrNull $count
11+
*
12+
* @return (
13+
TCountOrNull is int
14+
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
15+
: (
16+
TNameOrCountOrNull is int
17+
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
18+
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
19+
)
20+
21+
)
22+
*/
23+
function factory(string $modelClassName, $nameOrCount = null, $count = null)
24+
{
25+
}

stubs/7/helpers.stubphp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* @template TModel of \Illuminate\Database\Eloquent\Model
5+
* @template TNameOrCountOrNull of string|int|null
6+
* @template TCountOrNull of int|null
7+
*
8+
* @param class-string<TModel> $modelClassName
9+
* @param TNameOrCountOrNull $nameOrCount
10+
* @param TCountOrNull $count
11+
*
12+
* @return (
13+
TCountOrNull is int
14+
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
15+
: (
16+
TNameOrCountOrNull is int
17+
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
18+
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
19+
)
20+
21+
)
22+
*/
23+
function factory(string $modelClassName, $nameOrCount = null, $count = null)
24+
{
25+
}

stubs/helpers.stubphp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
11
<?php
22

3-
/**
4-
* @template TModel of \Illuminate\Database\Eloquent\Model
5-
* @template TNameOrCountOrNull of string|int|null
6-
* @template TCountOrNull of int|null
7-
*
8-
* @param class-string<TModel> $modelClassName
9-
* @param TNameOrCountOrNull $nameOrCount
10-
* @param TCountOrNull $count
11-
*
12-
* @return (
13-
TCountOrNull is int
14-
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TCountOrNull>
15-
: (
16-
TNameOrCountOrNull is int
17-
? Illuminate\Database\Eloquent\FactoryBuilder<TModel, TNameOrCountOrNull>
18-
: Illuminate\Database\Eloquent\FactoryBuilder<TModel, 1>
19-
)
20-
21-
)
22-
*/
23-
function factory(string $modelClassName, $nameOrCount = null, $count = null)
24-
{
25-
26-
}
27-
283
/**
294
* Return a new response from the application.
305
*

0 commit comments

Comments
 (0)