From 47396a62c81c24974e178a88b4315a183c373d90 Mon Sep 17 00:00:00 2001 From: Konrad Abicht Date: Thu, 25 Sep 2025 14:04:35 +0200 Subject: [PATCH] Update toHtml method return type and docblock Refactor toHtml method to return nullable string and add exception documentation. --- src/Markdown.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Markdown.php b/src/Markdown.php index e463d5c..dd7727f 100644 --- a/src/Markdown.php +++ b/src/Markdown.php @@ -174,9 +174,9 @@ private function addHtmlExtension(string $file_name): ?string /** * Compile Markdown to Raw HTML Output * - * @return string|null|\LogicException + * @throws \LogicException */ - public function toHtml(): \LogicException|string|null + public function toHtml(): ?string { if (!isset($this->contents) || count($this->contents) == 0) { throw new \LogicException(