upgraded dependencies
This commit is contained in:
@@ -22,25 +22,21 @@ interface CommandLoaderInterface
|
||||
/**
|
||||
* Loads a command.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return Command
|
||||
*
|
||||
* @throws CommandNotFoundException
|
||||
*/
|
||||
public function get($name);
|
||||
public function get(string $name);
|
||||
|
||||
/**
|
||||
* Checks if a command exists.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function has($name);
|
||||
public function has(string $name);
|
||||
|
||||
/**
|
||||
* @return string[] All registered command names
|
||||
* @return string[]
|
||||
*/
|
||||
public function getNames();
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ class ContainerCommandLoader implements CommandLoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($name)
|
||||
public function get(string $name)
|
||||
{
|
||||
if (!$this->has($name)) {
|
||||
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
|
||||
@@ -48,7 +48,7 @@ class ContainerCommandLoader implements CommandLoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function has($name)
|
||||
public function has(string $name)
|
||||
{
|
||||
return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]);
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class FactoryCommandLoader implements CommandLoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function has($name)
|
||||
public function has(string $name)
|
||||
{
|
||||
return isset($this->factories[$name]);
|
||||
}
|
||||
@@ -41,7 +41,7 @@ class FactoryCommandLoader implements CommandLoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get($name)
|
||||
public function get(string $name)
|
||||
{
|
||||
if (!isset($this->factories[$name])) {
|
||||
throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name));
|
||||
|
Reference in New Issue
Block a user