diff --git a/sources/AppBundle/Controller/Website/News/ListAction.php b/sources/AppBundle/Controller/Website/News/ListAction.php index f74ed0573..953276322 100644 --- a/sources/AppBundle/Controller/Website/News/ListAction.php +++ b/sources/AppBundle/Controller/Website/News/ListAction.php @@ -22,7 +22,7 @@ public function __construct( public function __invoke(Request $request): Response { - $page = $request->get('page', 1); + $page = $request->query->getInt('page', 1); $form = $this->createForm(NewsFiltersType::class); $form->handleRequest($request); diff --git a/sources/AppBundle/Site/Model/Repository/ArticleRepository.php b/sources/AppBundle/Site/Model/Repository/ArticleRepository.php index ef58ed0e0..d85a41795 100644 --- a/sources/AppBundle/Site/Model/Repository/ArticleRepository.php +++ b/sources/AppBundle/Site/Model/Repository/ArticleRepository.php @@ -79,7 +79,7 @@ public function countPublishedNews(array $filters) return $row['cnt']; } - public function findPublishedNews($page, $itemsPerPage, array $filters) + public function findPublishedNews(int $page, int $itemsPerPage, array $filters) { [$sql, $params] = $this->getSqlPublishedNews($filters); diff --git a/sources/AppBundle/TechLetter/DataExtractor.php b/sources/AppBundle/TechLetter/DataExtractor.php index 48ac546f9..9f6b97ec3 100644 --- a/sources/AppBundle/TechLetter/DataExtractor.php +++ b/sources/AppBundle/TechLetter/DataExtractor.php @@ -67,6 +67,6 @@ public function extractDataForTechLetter($url): array } } - return array_map(fn($value): string => trim($value), $data); + return array_map(fn(mixed $value): string => trim((string) $value), $data); } }