/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Console
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/Console/CommandFactory.php (1979B)
container = $container;
}
/**
* @inheritDoc
*/
public function create(string $className)
{
if ($this->container && $this->container->has($className)) {
$command = $this->container->get($className);
} else {
$command = new $className();
}
if (!($command instanceof CommandInterface) && !($command instanceof Shell)) {
/** @psalm-suppress DeprecatedClass */
$valid = implode('` or `', [Shell::class, CommandInterface::class]);
$message = sprintf('Class `%s` must be an instance of `%s`.', $className, $valid);
throw new InvalidArgumentException($message);
}
return $command;
}
}