diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index fc7c6ba..e6ea69e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.0] # 7.2, + php: [8.0] # 7.2,7.4, os: [ubuntu-latest, macOS-latest] # windows-latest, # include: # will not testing on php 7.2 # - os: 'ubuntu-latest' diff --git a/app/Lib/Template/HtmlTemplate.php b/app/Lib/Template/HtmlTemplate.php index 0e28eb5..c712c92 100644 --- a/app/Lib/Template/HtmlTemplate.php +++ b/app/Lib/Template/HtmlTemplate.php @@ -17,14 +17,12 @@ class HtmlTemplate extends TextTemplate /** * @param string $viewPath * @param array $vars - * - * @return string */ - public function render(string $viewPath, array $vars = []): string + public function render(string $viewPath, array $vars = []): void { $viewFile = $this->findTplFile($viewPath); - return $this->renderFile($viewFile, $vars); + echo $this->renderFile($viewFile, $vars); } /** diff --git a/app/Lib/Template/README.md b/app/Lib/Template/README.md index 73c3bdf..f2e5d2d 100644 --- a/app/Lib/Template/README.md +++ b/app/Lib/Template/README.md @@ -1,5 +1,5 @@ # Template -## Text2Template +## EasyTemplate