Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #420

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Concerns/HasPageMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public function canUseCanonicalUrl(): bool
public function canUseRssFeedLink(): bool
{
if (RssFeedService::canGenerateFeed() && isset($this->slug)) {

if ($this instanceof MarkdownPost) {
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Models/BladePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class BladePage extends AbstractPage
public string $view;

/**
* The page slug for compatibility
* The page slug for compatibility.
*
* @var string
*/
public string $slug;
Expand Down
1 change: 0 additions & 1 deletion src/Services/RssFeedService.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ protected function addAdditionalChannelData(): void
$this->feed->channel->addChild('lastBuildDate', date(DATE_RSS));
}


protected function getDescription(): string
{
return static::xmlEscape(
Expand Down
7 changes: 3 additions & 4 deletions tests/Unit/HasPageMetadataRssFeedLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ protected function setUp(): void
config(['hyde.site_url' => 'foo']);
}


public function test_can_use_rss_feed_link_adds_meta_link_for_markdown_posts()
{
$page = new MarkdownPost([], '');
Expand Down Expand Up @@ -50,7 +49,7 @@ public function test_can_use_rss_feed_link_adds_meta_link_for_markdown_index_pag
$page->renderPageMetadata()
);
}

public function test_can_use_rss_feed_link_adds_meta_link_for_blade_index_page()
{
$page = new BladePage('index');
Expand All @@ -60,7 +59,7 @@ public function test_can_use_rss_feed_link_adds_meta_link_for_blade_index_page()
$page->renderPageMetadata()
);
}

public function test_can_use_rss_feed_link_does_not_add_meta_link_for_documentation_index_page()
{
$page = new DocumentationPage([], '', slug: 'index');
Expand All @@ -80,7 +79,7 @@ public function test_can_use_rss_feed_uses_configured_site_url()
'<link rel="alternate" type="application/rss+xml" title="HydePHP RSS Feed" href="https://example.org/feed.xml" />',
$page->renderPageMetadata()
);
}
}

public function test_can_use_rss_feed_uses_configured_rss_file_name()
{
Expand Down