hasMultiValuedArgument() public method

Returns whether the format contains a multi-valued argument.
public hasMultiValuedArgument ( boolean $includeBase = true ) : boolean
$includeBase boolean Whether to include arguments in the base format in the search.
return boolean Returns `true` if the format contains a multi-valued argument and `false` otherwise.
Esempio n. 1
0
 /**
  * Returns whether the builder contains a multi-valued argument.
  *
  * @param bool $includeBase Whether to include arguments in the base format
  *                          in the search.
  *
  * @return bool Returns `true` if the builder contains a multi-valued
  *              argument and `false` otherwise.
  */
 public function hasMultiValuedArgument($includeBase = true)
 {
     Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
     if ($this->hasMultiValuedArg) {
         return true;
     }
     if ($includeBase && $this->baseFormat) {
         return $this->baseFormat->hasMultiValuedArgument();
     }
     return false;
 }
Esempio n. 2
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testHasMultiValuedArgumentFailsIfIncludeBaseNoBoolean()
 {
     $format = new ArgsFormat();
     $format->hasMultiValuedArgument(1234);
 }