Webmozart\Console\Api\Args\Format\ArgsFormatBuilder::getArguments PHP Method

getArguments() public method

Returns all arguments added to the builder.
public getArguments ( boolean $includeBase = true ) : Argument[]
$includeBase boolean Whether to include arguments of the base format in the result.
return Argument[] The arguments.
    public function getArguments($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');
        $arguments = $this->arguments;
        if ($includeBase && $this->baseFormat) {
            // prepend base arguments
            $arguments = array_replace($this->baseFormat->getArguments(), $arguments);
        }
        return $arguments;
    }

Usage Example

 /**
  * @expectedException \InvalidArgumentException
  */
 public function testGetArgumentsFailsIfIncludeBaseNoBoolean()
 {
     $this->builder->getArguments(1234);
 }
All Usage Examples Of Webmozart\Console\Api\Args\Format\ArgsFormatBuilder::getArguments