protected function renderTemplate(string $templatePath, array $variables = []): string
    {
        $variables = array_merge($this->variables, $variables);

        extract($variables, EXTR_OVERWRITE);

        ob_start();
        include $templatePath;

        return ob_get_clean();
    }