From c527e9781f82a4057a50965899de2f2298cde2ff Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 26 Jun 2024 20:49:38 +0200 Subject: [PATCH] Replace ternary expression with if/else block --- packages/framework/src/Support/Includes.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/framework/src/Support/Includes.php b/packages/framework/src/Support/Includes.php index 182ce218c7b..824e1ae3382 100644 --- a/packages/framework/src/Support/Includes.php +++ b/packages/framework/src/Support/Includes.php @@ -87,7 +87,11 @@ public static function markdown(string $filename, ?string $default = null): ?Htm $path = static::normalizePath($filename, '.md'); if (! Filesystem::exists($path)) { - return $default === null ? null : new HtmlString(trim(Markdown::render($default, MarkdownDocument::class))); + if ($default === null) { + return null; + } else { + return new HtmlString(trim(Markdown::render($default, MarkdownDocument::class))); + } } return new HtmlString(trim(Markdown::render(Filesystem::get($path), MarkdownDocument::class)));