You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will validate without throwing an exception even with missing required arguments. It happens when there are enough optional arguments set. They kind of "make up" for missing required arguments.
Class Input will probably have to keep track of how many required arguments were set.
/** * Validates the input. * * @throws \RuntimeException When not enough arguments are given */publicfunctionvalidate()
{
if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) {
thrownew \RuntimeException('Not enough arguments.');
}
}