Imprecise composer autoload_files #4751
-
Is there a way to stub imprecise composer autoload_files? The motivation here is Laravel 6.x has PHPStan It's not possible to use PHPStan The only workaround I have at the moment is to use a phpstan base line. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, if I understand the problem correctly, it's that the function is defined as: function factory()
{
$factory = app(EloquentFactory::class);
$arguments = func_get_args();
if (isset($arguments[1]) && is_string($arguments[1])) {
return $factory->of($arguments[0], $arguments[1])->times($arguments[2] ?? null);
} elseif (isset($arguments[1])) {
return $factory->of($arguments[0])->times($arguments[1]);
}
return $factory->of($arguments[0]);
} But PHPStan complains with: Three points:
Am I right? |
Beta Was this translation helpful? Give feedback.
Hi, if I understand the problem correctly, it's that the function is defined as:
But PHPStan complains with:
Function factory invoked with 1 parameter, 0 required
Three points: