Skip to content

Commit

Permalink
Merge 2.x into 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jul 13, 2022
2 parents cba8954 + d2f83a9 commit 226ddae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
'no_useless_return' => true,
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'ordered_class_elements' => true,
'ordered_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']],
'php_unit_method_casing' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
Expand Down
4 changes: 2 additions & 2 deletions src/Writer/SitemapWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private function generateImageLine(array $data): string
$images .= '<image:image>';

foreach ($image as $key => $element) {
$images .= sprintf('<image:%1$s>%2$s</image:%1$s>', ($builder[$key] ?? $key), $element);
$images .= sprintf('<image:%1$s>%2$s</image:%1$s>', $builder[$key] ?? $key, $element);
}

$images .= '</image:image>';
Expand All @@ -289,7 +289,7 @@ private function generateVideoLine(array $data): string
];

foreach ($data['video'] as $key => $video) {
$videos .= sprintf('<video:%1$s>%2$s</video:%1$s>', ($builder[$key] ?? $key), $video);
$videos .= sprintf('<video:%1$s>%2$s</video:%1$s>', $builder[$key] ?? $key, $video);
}

return sprintf(' '.'<url><loc>%s</loc><video:video>%s</video:video></url>'."\n", $data['url'], $videos);
Expand Down

0 comments on commit 226ddae

Please sign in to comment.