Skip to content

Commit e649499

Browse files
authored
Merge pull request #294 from jackbayliss/hotfix/reorder-set-page-attributes
Reorders set page attributes
2 parents bfdd9bc + cb2b7cb commit e649499

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Writer/Entity/Category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncluded
7070
$this->sitemapChangeFrequency = $sitemapChangeFrequency;
7171
}
7272

73-
public function setPageAttributes(?string $pageTitle = null, ?string $pageDescription = null, ?string $pageKeywords = null, ?string $pageUrl = null): void
73+
public function setPageAttributes(?string $pageTitle = null, ?string $pageDescription = null, ?string $pageUrl = null, ?string $pageKeywords = null): void
7474
{
7575
$this->pageAttributes = [
7676
'page-title' => $pageTitle,

src/Writer/Entity/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncluded
146146
$this->sitemapChangeFrequency = $sitemapChangeFrequency;
147147
}
148148

149-
public function setPageAttributes(?string $pageTitle, ?string $pageDescription, ?string $pageKeywords, ?string $pageUrl): void
149+
public function setPageAttributes(?string $pageTitle = null, ?string $pageDescription = null, ?string $pageUrl = null, ?string $pageKeywords = null): void
150150
{
151151
$this->pageAttributes = [
152152
'page-title' => $pageTitle,

tests/Writer/CategoriesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function test_categories_xml(): void
5454
$element->setTemplate('cat-listings.html');
5555
$element->setOnlineFlag(true);
5656
$element->setSitemap(0.2);
57-
$element->setPageAttributes($title, 'Buy ' . $title, mb_strtolower($title), '/' . $title);
57+
$element->setPageAttributes($title, 'Buy ' . $title, '/' . $title, mb_strtolower($title));
5858
$element->setOnlineFromTo(
5959
$data['dates']['from'],
6060
$data['dates']['to']

tests/Writer/ProductsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ protected function buildBaseElement(string $type, int $number = 0): Product
135135
$element->setPageAttributes(
136136
'Amazing ' . $type,
137137
'Buy our ' . $type . ' today!',
138+
'http://example.com/' . mb_strtolower($type) . '/123',
138139
$type . ', test, example',
139-
'http://example.com/' . mb_strtolower($type) . '/123'
140140
);
141141

142142
$element->addCustomAttributes([

0 commit comments

Comments
 (0)