You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phpcommandline/src/CommandLine/Argument/Option/OptionArgumentList.php

20 lines
535 B
PHP

<?php
namespace jrosset\CommandLine\Argument\Option;
use InvalidArgumentException;
use jrosset\CommandLine\Argument\AbstractArgumentList;
/**
* A list of value arguments
*/
class OptionArgumentList extends AbstractArgumentList {
/**
* @inheritDoc
*/
protected function checkArrayElementType ($key, $element): void {
if (!$element instanceof IOptionArgument) {
throw new InvalidArgumentException('The "' . $key . '" element is not a ' . IOptionArgument::class . ' instance');
}
}
}