From 341ed9aa439ada0ee08c4e0f580954d80f7210af Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 10 Dec 2019 22:50:27 +0100 Subject: [PATCH] fixed bugs reported by PHPStan --- src/Bridges/FormsLatte/FormMacros.php | 2 +- src/Forms/Form.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bridges/FormsLatte/FormMacros.php b/src/Bridges/FormsLatte/FormMacros.php index 07bba735c..4ef32f3cc 100644 --- a/src/Bridges/FormsLatte/FormMacros.php +++ b/src/Bridges/FormsLatte/FormMacros.php @@ -25,7 +25,7 @@ * - {inputError name} * - {formContainer name} ... {/formContainer} */ -class FormMacros extends MacroSet +final class FormMacros extends MacroSet { public static function install(Latte\Compiler $compiler): void { diff --git a/src/Forms/Form.php b/src/Forms/Form.php index 8f53c8b4e..206a8dacc 100644 --- a/src/Forms/Form.php +++ b/src/Forms/Form.php @@ -623,6 +623,7 @@ public function __toString(): string throw $e; } trigger_error('Exception in ' . __METHOD__ . "(): {$e->getMessage()} in {$e->getFile()}:{$e->getLine()}", E_USER_ERROR); + return ''; } }