From eb4824202491789b1575659c5dfa7773d533bd4e Mon Sep 17 00:00:00 2001 From: Joseph Date: Mon, 9 Oct 2023 11:25:39 +0100 Subject: [PATCH] Rename Format to FeedFormat --- include/{Format/Format.php => FeedFormat/FeedFormat.php} | 7 ++++--- include/{Format => FeedFormat}/Html.php | 5 ++--- include/{Format => FeedFormat}/Json.php | 4 ++-- include/{Format => FeedFormat}/Rss.php | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename include/{Format/Format.php => FeedFormat/FeedFormat.php} (97%) rename include/{Format => FeedFormat}/Html.php (96%) rename include/{Format => FeedFormat}/Json.php (98%) rename include/{Format => FeedFormat}/Rss.php (98%) diff --git a/include/Format/Format.php b/include/FeedFormat/FeedFormat.php similarity index 97% rename from include/Format/Format.php rename to include/FeedFormat/FeedFormat.php index 05bc9e71..1e7b3a9b 100644 --- a/include/Format/Format.php +++ b/include/FeedFormat/FeedFormat.php @@ -1,12 +1,13 @@ $data Feed data */ protected array $data = []; @@ -122,7 +123,7 @@ protected function buildContent(array $video): string

{$description}

HTML; - return \App\Helper\Format::minify(trim($html)); + return Format::minify(trim($html)); } /** diff --git a/include/Format/Html.php b/include/FeedFormat/Html.php similarity index 96% rename from include/Format/Html.php rename to include/FeedFormat/Html.php index 6099902f..6f4f06e8 100644 --- a/include/Format/Html.php +++ b/include/FeedFormat/Html.php @@ -1,12 +1,12 @@ data['videos'] as $video) { $itemTitle = htmlspecialchars($this->buildTitle($video)); $itemUrl = $video['url']; - $itemEnclosure = $video['thumbnail']; $itemCategories = $this->buildCategories($video['tags']); $itemContent = $this->buildContent($video); diff --git a/include/Format/Json.php b/include/FeedFormat/Json.php similarity index 98% rename from include/Format/Json.php rename to include/FeedFormat/Json.php index 1df3e744..2f79ab91 100644 --- a/include/Format/Json.php +++ b/include/FeedFormat/Json.php @@ -9,13 +9,13 @@ * https://json-feed-validator.herokuapp.com/validate */ -namespace App\Format; +namespace App\FeedFormat; use App\Configuration as Config; use App\Helper\Convert; use App\Helper\Url; -class Json extends Format +class Json extends FeedFormat { /** @var string $contentType HTTP content-type header value */ protected string $contentType = 'application/json'; diff --git a/include/Format/Rss.php b/include/FeedFormat/Rss.php similarity index 98% rename from include/Format/Rss.php rename to include/FeedFormat/Rss.php index 0dcfe834..46a54855 100644 --- a/include/Format/Rss.php +++ b/include/FeedFormat/Rss.php @@ -1,13 +1,13 @@