protected function invokeCallable(callable $callback, $callbackArguments)
    {
        if ($callbackArguments === null) {
            return $callback();
        }

        if (Arr::isIndexed($callbackArguments)) {
            return call_user_func_array($callback, (array) $callbackArguments);
        }

        $orderedArgs = $this->getArguments($callback, $callbackArguments);

        return call_user_func_array($callback, $orderedArgs);
    }
protected function invokeCallable(callable $callback, $callbackArguments)
    {
        if ($callbackArguments === null) {
            return $callback();
        }

        if (Arr::isIndexed($callbackArguments)) {
            return call_user_func_array($callback, (array) $callbackArguments);
        }

        $orderedArgs = $this->getArguments($callback, $callbackArguments);

        return call_user_func_array($callback, $orderedArgs);
    }
protected function invokeCallable ( callable $ callback , $ callbackArguments ) { if ( $ callbackArguments === null ) { return $ callback ( ) ; } if ( Arr :: isIndexed ( $ callbackArguments ) ) { return call_user_func_array ( $ callback , ( array ) $ callbackArguments ) ; } $ orderedArgs = $ this -> getArguments ( $ callback , $ callbackArguments ) ; return call_user_func_array ( $ callback , $ orderedArgs ) ; }
Get the return value from the callable.

Parameters can be can handled in three ways:
- null              - Nothing passed to the callback
- Indexed array     - Value of each element will be passed to function in order
- Associative array - Key names will attempt to match to the callable function variable names

@param callable $callback
@param array    $callbackArguments

@return string
Get the return value from the callable .