Эх сурвалжийг харах

Correction d'une coquille de paramètre

Sangfroid 4 долоо хоног өмнө
parent
commit
fc8a066a0a

+ 1 - 1
src/Controller/FeedController.php

@@ -25,7 +25,7 @@ class FeedController extends AbstractController
     {
         $articles = $this->articleRepository->findBy(criteria: ['state' => 'published'], orderBy: ['publicationDate' => 'DESC']);
 
-        $feedContent = $this->feedService->createFeed($articles, $type, $this->articleRepository->findLastPublicationDate());
+        $feedContent = $this->feedService->createFeed($articles, $this->articleRepository->findLastPublicationDate(), $type);
 
         $contentType = $type === FeedService::RSS ? 'application/rss+xml' : 'application/atom+xml';
 

+ 1 - 1
src/Service/FeedService.php

@@ -25,7 +25,7 @@ class FeedService
 
     }
 
-    public function createFeed(array $articles, string $type = self::RSS, \DateTimeImmutable $updatedAt): string
+    public function createFeed(array $articles, \DateTimeImmutable $updatedAt, string $type = self::RSS): string
     {
         $feed = new Feed();
         $feed->setTitle($this->parameterBagInterface->get('title'));