diff --git a/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php b/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php index a44bcf989..c4476a041 100644 --- a/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php @@ -22,9 +22,9 @@ use Symfony\Component\Serializer\SerializerInterface; class NewsItemApiController { public function __construct( - private NewsItemRepository $newsItemRepository, - private SerializerInterface $serializer, - private PaginatorFactory $paginatorFactory + private readonly NewsItemRepository $newsItemRepository, + private readonly SerializerInterface $serializer, + private readonly PaginatorFactory $paginatorFactory ) {} /** diff --git a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php index 3e918dfd1..6787e78bd 100644 --- a/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NewsItemRepository.php @@ -22,7 +22,7 @@ class NewsItemRepository implements ObjectRepository { private readonly EntityRepository $repository; - public function __construct(EntityManagerInterface $entityManager, private ClockInterface $clock) + public function __construct(EntityManagerInterface $entityManager, private readonly ClockInterface $clock) { $this->repository = $entityManager->getRepository(NewsItem::class); } diff --git a/src/Bundle/ChillMainBundle/Tests/Dashboard/NewsItemControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Dashboard/NewsItemControllerTest.php index 8809138a2..bbbd354e6 100644 --- a/src/Bundle/ChillMainBundle/Tests/Dashboard/NewsItemControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Dashboard/NewsItemControllerTest.php @@ -1,5 +1,14 @@ newsItemRepository = self::$container->get(NewsItemRepository::class); } + /** + * @doesNotPerformAssertions + */ public function testFindWithDateFilter(): void { $clock = new MockClock('2023-11-20'); @@ -44,7 +55,5 @@ class NewsItemRepositoryTest extends KernelTestCase $newsItemC->setContent('tralala'); $newsItemC->setStartDate(new \DateTime('2023-11-03')); $newsItemC->setEndDate(null); - } - }