Closed
Description
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
*/
public function validate()
{
if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) {
throw new \RuntimeException('Not enough arguments.');
}
}