public function invoke(callable $function, array $parameters = [])
    {
        $reflection = $this->reflectionTools->getReflectionFunction($function);
        $parameters = $this->getFunctionParameters($reflection, $parameters);

        return call_user_func_array($function, $parameters);
    }