src/Resolver.php
public function resolve($closure)
    {
        if (is_array($closure)) {
            $reflection = new \ReflectionMethod($closure[0], $closure[1]);
        } else {
            $reflection = new \ReflectionFunction($closure);
        }

        $arguments = $reflection->getParameters();

        $arguments = array_map(function ($argument) {
            return isset($this->bindMaps[$argument->name]) ? $this->bindMaps[$argument->name] : null;
        }, $arguments);

        return @call_user_func_array($closure, $arguments);
    }
public function resolve($closure)
    {
        if (is_array($closure)) {
            $reflection = new \ReflectionMethod($closure[0], $closure[1]);
        } else {
            $reflection = new \ReflectionFunction($closure);
        }

        $arguments = $reflection->getParameters();

        $arguments = array_map(function ($argument) {
            return isset($this->bindMaps[$argument->name]) ? $this->bindMaps[$argument->name] : null;
        }, $arguments);

        return @call_user_func_array($closure, $arguments);
    }
public function resolve ( $ closure ) { if ( is_array ( $ closure ) ) { $ reflection = new \ ReflectionMethod ( $ closure [ 0 ] , $ closure [ 1 ] ) ; } else { $ reflection = new \ ReflectionFunction ( $ closure ) ; } $ arguments = $ reflection -> getParameters ( ) ; $ arguments = array_map ( function ( $ argument ) { return isset ( $ this -> bindMaps [ $ argument -> name ] ) ? $ this -> bindMaps [ $ argument -> name ] : null ; } , $ arguments ) ; return @ call_user_func_array ( $ closure , $ arguments ) ; }
Resolve the closure and do the magic here

@param Closure $closure

@return mixed
Resolve the closure and do the magic here