From cfe57fc04343ce94793d0a378d64ff36d6077b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Rie=C3=9F?= Date: Wed, 20 May 2026 10:34:15 +0200 Subject: [PATCH] Clarify that `streamPdfFromHtml` never returns This commit also includes phpdoc formating changes --- library/Icinga/Application/Hook/PdfexportHook.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/Icinga/Application/Hook/PdfexportHook.php b/library/Icinga/Application/Hook/PdfexportHook.php index fe3ca8fc6..f02b5c25b 100644 --- a/library/Icinga/Application/Hook/PdfexportHook.php +++ b/library/Icinga/Application/Hook/PdfexportHook.php @@ -7,6 +7,7 @@ namespace Icinga\Application\Hook; use Icinga\Application\Hook; use Icinga\Application\Logger; +use ipl\Html\ValidHtml; use RuntimeException; use Throwable; @@ -44,15 +45,17 @@ abstract class PdfexportHook /** * Get whether PDF export is supported * - * @return bool + * @return bool */ abstract public function isSupported(); /** * Render the specified HTML to PDF and stream it to the client * - * @param string $html The HTML to render to PDF - * @param string $filename The filename for the generated PDF + * @param ValidHtml $html The HTML to render to PDF + * @param string $filename The filename for the generated PDF + * + * @return never */ abstract public function streamPdfFromHtml($html, $filename);