Webmozart\Console\Adapter\ArgsInput::getFirstArgument PHP Method

getFirstArgument() public method

public getFirstArgument ( )
    public function getFirstArgument()
    {
        $tokens = $this->rawArgs->getTokens();
        return count($tokens) > 0 ? reset($tokens) : null;
    }

Usage Example

Beispiel #1
0
 public function testGetNoFirstArgument()
 {
     $input = new ArgsInput(new StringArgs(''));
     $this->assertNull($input->getFirstArgument());
 }