From 281edf9104f31012e0c5e57233c5b4a46551ef86 Mon Sep 17 00:00:00 2001 From: Dave Smith-Hayes Date: Tue, 15 Apr 2025 21:09:37 -0400 Subject: [PATCH] Add documentation for some exceptions that can be thrown. --- app/src/Handler/Handler.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/Handler/Handler.php b/app/src/Handler/Handler.php index 7afceb5..b2cedba 100644 --- a/app/src/Handler/Handler.php +++ b/app/src/Handler/Handler.php @@ -6,6 +6,9 @@ use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Slim\Views\Twig; use Slim\Routing\RouteContext; +use Twig\Error\LoaderError; +use Twig\Error\RuntimeError; +use Twig\Error\SyntaxError; abstract class Handler { @@ -53,6 +56,9 @@ abstract class Handler * @param string $templateName The name of the template * @param array $data The data for the template * @return Response + * @throws LoaderError + * @throws RuntimeError + * @throws SyntaxError */ public function render(string $templateName, array $data = []): Response { @@ -78,6 +84,8 @@ abstract class Handler * @param string $html The raw Twig HTML to render * @param array $data The data to injext into the HTML * @return Response + * @throws LoaderError + * @throws SyntaxError */ public function renderInline(string $html, array $data = []): Response {