Neos\Flow\Cli\Command::hasArguments PHP Method

hasArguments() public method

Returns TRUE if this command expects required and/or optional arguments, otherwise FALSE
public hasArguments ( ) : boolean
return boolean
    public function hasArguments()
    {
        return count($this->getCommandMethodReflection()->getParameters()) > 0;
    }

Usage Example

 /**
  * @test
  */
 public function hasArgumentsReturnsTrueIfCommandExpectsArguments()
 {
     $parameterReflection = $this->createMock(ParameterReflection::class, [], [[__CLASS__, 'dummyMethod'], 'arg']);
     $this->methodReflection->expects($this->atLeastOnce())->method('getParameters')->will($this->returnValue([$parameterReflection]));
     $this->assertTrue($this->command->hasArguments());
 }