@@ 446-460 (lines=15) @@ | ||
443 | * @return bool Returns `true` if the argument with the given name or |
|
444 | * position could be found and `false` otherwise. |
|
445 | */ |
|
446 | public function hasArgument($name, $includeBase = true) |
|
447 | { |
|
448 | if (!is_int($name)) { |
|
449 | Assert::string($name, 'The argument name must be a string or an integer. Got: %s'); |
|
450 | Assert::notEmpty($name, 'The argument name must not be empty.'); |
|
451 | } |
|
452 | ||
453 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
454 | ||
455 | $arguments = is_int($name) |
|
456 | ? array_values($this->getArguments($includeBase)) |
|
457 | : $this->getArguments($includeBase); |
|
458 | ||
459 | return isset($arguments[$name]); |
|
460 | } |
|
461 | ||
462 | /** |
|
463 | * Returns whether the format contains a multi-valued argument. |
@@ 539-553 (lines=15) @@ | ||
536 | * @return bool Returns `true` if the argument with the given name or |
|
537 | * position could be found and `false` otherwise. |
|
538 | */ |
|
539 | public function hasArgument($name, $includeBase = true) |
|
540 | { |
|
541 | if (!is_int($name)) { |
|
542 | Assert::string($name, 'The argument name must be a string or an integer. Got: %s'); |
|
543 | Assert::notEmpty($name, 'The argument name must not be empty.'); |
|
544 | } |
|
545 | ||
546 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
547 | ||
548 | $arguments = is_int($name) |
|
549 | ? array_values($this->getArguments($includeBase)) |
|
550 | : $this->getArguments($includeBase); |
|
551 | ||
552 | return isset($arguments[$name]); |
|
553 | } |
|
554 | ||
555 | /** |
|
556 | * Returns whether the builder contains a multi-valued argument. |