Skip to content

Commit

Permalink
Rename Format to FeedFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph committed Oct 9, 2023
1 parent 6b8fc44 commit eb48242
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

namespace App\Format;
namespace App\FeedFormat;

use App\Configuration as Config;
use App\Helper\Convert;
use App\Helper\Format;
use App\Helper\Url;

abstract class Format
abstract class FeedFormat
{
/** @var array<string, mixed> $data Feed data */
protected array $data = [];
Expand Down Expand Up @@ -122,7 +123,7 @@ protected function buildContent(array $video): string
<hr/><p>{$description}</p>
HTML;

return \App\Helper\Format::minify(trim($html));
return Format::minify(trim($html));
}

/**
Expand Down
5 changes: 2 additions & 3 deletions include/Format/Html.php → include/FeedFormat/Html.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace App\Format;
namespace App\FeedFormat;

use App\Configuration as Config;
use App\Template;
use App\Helper\Url;

class Html extends Format
class Html extends FeedFormat
{
/** @var string $contentType HTTP content-type header value */
protected string $contentType = 'text/html; charset=UTF-8';
Expand Down Expand Up @@ -51,7 +51,6 @@ protected function buildItems(): string
foreach ($this->data['videos'] as $video) {
$itemTitle = htmlspecialchars($this->buildTitle($video));
$itemUrl = $video['url'];
$itemEnclosure = $video['thumbnail'];
$itemCategories = $this->buildCategories($video['tags']);
$itemContent = $this->buildContent($video);

Expand Down
4 changes: 2 additions & 2 deletions include/Format/Json.php → include/FeedFormat/Json.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions include/Format/Rss.php → include/FeedFormat/Rss.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace App\Format;
namespace App\FeedFormat;

use App\Configuration as Config;
use App\Template;
use App\Helper\Convert;
use App\Helper\Url;

class Rss extends Format
class Rss extends FeedFormat
{
/** @var string $contentType HTTP content-type header value */
protected string $contentType = 'text/xml; charset=UTF-8';
Expand Down

0 comments on commit eb48242

Please sign in to comment.