changed render from void to never
This commit is contained in:
parent
60860a0bce
commit
2f99531780
|
@ -13,8 +13,6 @@ namespace App\Service;
|
||||||
* using PHP as a templating engine.
|
* using PHP as a templating engine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use JetBrains\PhpStorm\NoReturn;
|
|
||||||
|
|
||||||
class Template
|
class Template
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -28,8 +26,7 @@ class Template
|
||||||
/*
|
/*
|
||||||
* Add variables to template and throw it out
|
* Add variables to template and throw it out
|
||||||
*/
|
*/
|
||||||
#[NoReturn]
|
public function render(string $templateName, array $vars = []): never
|
||||||
public function render(string $templateName, array $vars = []): void
|
|
||||||
{
|
{
|
||||||
// assign template vars
|
// assign template vars
|
||||||
foreach ($vars as $name => $value) {
|
foreach ($vars as $name => $value) {
|
||||||
|
|
Loading…
Reference in New Issue