[Console] Fix type annotation on InputInterface::hasArgument()
This commit is contained in:
parent
9928be05fe
commit
6ac2776c47
@ -106,7 +106,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
||||
*/
|
||||
public function getArgument($name)
|
||||
{
|
||||
if (!$this->definition->hasArgument($name)) {
|
||||
if (!$this->definition->hasArgument((string) $name)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
||||
*/
|
||||
public function setArgument($name, $value)
|
||||
{
|
||||
if (!$this->definition->hasArgument($name)) {
|
||||
if (!$this->definition->hasArgument((string) $name)) {
|
||||
throw new InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
||||
*/
|
||||
public function hasArgument($name)
|
||||
{
|
||||
return $this->definition->hasArgument($name);
|
||||
return $this->definition->hasArgument((string) $name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ interface InputInterface
|
||||
/**
|
||||
* Returns true if an InputArgument object exists by name or position.
|
||||
*
|
||||
* @param string|int $name The InputArgument name or position
|
||||
* @param string $name The InputArgument name or position
|
||||
*
|
||||
* @return bool true if the InputArgument object exists, false otherwise
|
||||
*/
|
||||
|
Reference in New Issue
Block a user