public function noMoreDefinedArguments()
    {
        $definedArguments = array_filter($this->arguments, function ($argument) {
            return !is_null($argument);
        });

        if ($count = count($definedArguments)) {
            throw new InvalidArgumentException('You pass '.$count.' unexpected not null arguments');
        }
    }
public function noMoreDefinedArguments()
    {
        $definedArguments = array_filter($this->arguments, function ($argument) {
            return !is_null($argument);
        });

        if ($count = count($definedArguments)) {
            throw new InvalidArgumentException('You pass '.$count.' unexpected not null arguments');
        }
    }
public function noMoreDefinedArguments ( ) { $ definedArguments = array_filter ( $ this -> arguments , function ( $ argument ) { return ! is_null ( $ argument ) ; } ) ; if ( $ count = count ( $ definedArguments ) ) { throw new InvalidArgumentException ( 'You pass ' . $ count . ' unexpected not null arguments' ) ; } }
Throw an exception if all the arguments except null ones
have not yet been taken.

@throws InvalidArgumentException
Throw an exception if all the arguments except null ones have not yet been taken .