From 657e0980892a6526266d21b8a847212c653a541d Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Wed, 24 Apr 2024 14:20:20 +0200 Subject: [PATCH] Code styling --- app/Classes/Bundle.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/Classes/Bundle.php b/app/Classes/Bundle.php index d852547..525302e 100644 --- a/app/Classes/Bundle.php +++ b/app/Classes/Bundle.php @@ -104,6 +104,23 @@ public function getParent(): ?Bundle return $this->parent; } + public function getArticleTitle(): string + { + return $this->metadata()->get('title') ?? Str::title(basename($this->path)); + } + + public function getSiteTitle(): string + { + $title = $this->getArticleTitle(); + $section = $this->getSection(); + + if (!empty($section) && $section->getPath() !== $this->getPath()) { + $title .= ' - ' . $section->getArticleTitle(); + } + + return $title; + } + /** * Return a boolean value indicating if there already is a bundle in * specified path @@ -146,23 +163,6 @@ public function repair(): void $this->save(); } - public function getArticleTitle(): string - { - return $this->metadata()->get('title') ?? Str::title(basename($this->path)); - } - - public function getSiteTitle(): string - { - $title = $this->getArticleTitle(); - $section = $this->getSection(); - - if (!empty($section) && $section->getPath() !== $this->getPath()) { - $title .= ' - ' . $section->getArticleTitle(); - } - - return $title; - } - public function render() { $renderer = BundleRenderer::getBundleRendererFor($this);