src/Invocation/Invoker.php
public function callWith($callback, Arguments $arguments)
    {
        if ($callback instanceof Invocable) {
            return $callback->invokeWith($arguments);
        }

        $arguments = $arguments->all();

        return $callback(...$arguments);
    }
public function callWith($callback, Arguments $arguments)
    {
        if ($callback instanceof Invocable) {
            return $callback->invokeWith($arguments);
        }

        $arguments = $arguments->all();

        return $callback(...$arguments);
    }
public function callWith ( $ callback , Arguments $ arguments ) { if ( $ callback instanceof Invocable ) { return $ callback -> invokeWith ( $ arguments ) ; } $ arguments = $ arguments -> all ( ) ; return $ callback ( ... $ arguments ) ; }
Calls a callback, maintaining reference parameters.

@param callable  $callback  The callback.
@param Arguments $arguments The arguments.

@return mixed     The result of invocation.
@throws Throwable If an error occurs.
Calls a callback maintaining reference parameters .