protected function addVars(\Closure $func)
    {
        $args = (new \ReflectionFunction($func))->getParameters();
        if (count($args) === 0) {
            return $func();
        }

        $fArgs = array_map(function($key) {
            return $this->values[$key];
        },
            array_map(function($arg) {
                return $arg->getName();
            },
                $args
            )
        );

        return call_user_func_array($func, $fArgs);
    }
protected function addVars(\Closure $func)
    {
        $args = (new \ReflectionFunction($func))->getParameters();
        if (count($args) === 0) {
            return $func();
        }

        $fArgs = array_map(function($key) {
            return $this->values[$key];
        },
            array_map(function($arg) {
                return $arg->getName();
            },
                $args
            )
        );

        return call_user_func_array($func, $fArgs);
    }
protected function addVars ( \ Closure $ func ) { $ args = ( new \ ReflectionFunction ( $ func ) ) -> getParameters ( ) ; if ( count ( $ args ) === 0 ) { return $ func ( ) ; } $ fArgs = array_map ( function ( $ key ) { return $ this -> values [ $ key ] ; } , array_map ( function ( $ arg ) { return $ arg -> getName ( ) ; } , $ args ) ) ; return call_user_func_array ( $ func , $ fArgs ) ; }
Execute the function assigned to the value, binding in values created earlier
in the assembly

@param \Closure $func

@return mixed
Execute the function assigned to the value binding in values created earlier in the assembly