Skip to content

Commit 7a394d2

Browse files
authored
Merge pull request #7566 from paulbalandan/phpstan-cleanup
refactor: remove Factories::models()
2 parents 647afc3 + 23f72b6 commit 7a394d2

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

system/Config/Factories.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* instantiation checks.
2525
*
2626
* @method static BaseConfig|null config(...$arguments)
27+
* @method static Model|null models(string $name, array $options = [], ?ConnectionInterface &$conn = null)
2728
*/
2829
class Factories
2930
{
@@ -69,23 +70,6 @@ class Factories
6970
*/
7071
protected static $instances = [];
7172

72-
/**
73-
* This method is only to prevent PHPStan error.
74-
* If we have a solution, we can remove this method.
75-
* See https://github.com/codeigniter4/CodeIgniter4/pull/5358
76-
*
77-
* @template T of Model
78-
*
79-
* @phpstan-param class-string<T> $name
80-
*
81-
* @return Model
82-
* @phpstan-return T
83-
*/
84-
public static function models(string $name, array $options = [], ?ConnectionInterface &$conn = null)
85-
{
86-
return self::__callStatic('models', [$name, $options, $conn]);
87-
}
88-
8973
/**
9074
* Loads instances based on the method component name. Either
9175
* creates a new instance or returns an existing shared instance.

0 commit comments

Comments
 (0)