private function getArguments(callable $callback, array $callbackArguments)
    {
        $parameters = $this->getParameters($callback);
        $arguments = [];
        foreach ($parameters as $param) {
            if (array_key_exists($param->getName(), $callbackArguments)) {
                $arguments[] = $callbackArguments[$param->getName()];
            } elseif ($param->isDefaultValueAvailable()) {
                $arguments[] = $param->getDefaultValue();
            } else {
                $arguments[$param->getName()] = null;
            }
        }

        return $arguments;
    }
private function getArguments(callable $callback, array $callbackArguments)
    {
        $parameters = $this->getParameters($callback);
        $arguments = [];
        foreach ($parameters as $param) {
            if (array_key_exists($param->getName(), $callbackArguments)) {
                $arguments[] = $callbackArguments[$param->getName()];
            } elseif ($param->isDefaultValueAvailable()) {
                $arguments[] = $param->getDefaultValue();
            } else {
                $arguments[$param->getName()] = null;
            }
        }

        return $arguments;
    }
private function getArguments ( callable $ callback , array $ callbackArguments ) { $ parameters = $ this -> getParameters ( $ callback ) ; $ arguments = [ ] ; foreach ( $ parameters as $ param ) { if ( array_key_exists ( $ param -> getName ( ) , $ callbackArguments ) ) { $ arguments [ ] = $ callbackArguments [ $ param -> getName ( ) ] ; } elseif ( $ param -> isDefaultValueAvailable ( ) ) { $ arguments [ ] = $ param -> getDefaultValue ( ) ; } else { $ arguments [ $ param -> getName ( ) ] = null ; } } return $ arguments ; }
Get an ordered list of arguments.

@param callable $callback
@param array    $callbackArguments

@return array
Get an ordered list of arguments .