File tree Expand file tree Collapse file tree
Resources/views/BasicEntities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function book(string $slug): Response
5656
5757 public function list (Request $ request ): Response
5858 {
59- $ page = $ request ->get ('page ' , 1 );
59+ $ page = ( int ) $ request ->get ('page ' , 1 );
6060 $ model = $ this ->service ->getBooksListViewModel ($ page );
6161
6262 return $ this ->renderer ->renderResponse (
Original file line number Diff line number Diff line change 1818
1919class BooksListViewModel
2020{
21- /** @var SlidingPaginationInterface<Book> */
21+ /**
22+ * @phpstan-var SlidingPaginationInterface<Book>
23+ * @psalm-var SlidingPaginationInterface
24+ */
2225 protected $ pagination ;
2326
2427 /** @var array<mixed> */
2528 protected $ paginationData ;
2629
27- /** @return SlidingPaginationInterface<Book>|null */
30+ /** @phpstan-return SlidingPaginationInterface<Book>|null
31+ * @psalm-return SlidingPaginationInterface|null
32+ */
2833 public function getPagination (): ?SlidingPaginationInterface
2934 {
3035 return $ this ->pagination ;
3136 }
3237
3338 /**
34- * @param SlidingPaginationInterface<Book> $pagination */
39+ * @phpstan-param SlidingPaginationInterface<Book> $pagination
40+ * @psalm-param SlidingPaginationInterface $pagination
41+ * */
3542 public function setPagination (SlidingPaginationInterface &$ pagination ): self
3643 {
3744 $ this ->pagination = $ pagination ;
Original file line number Diff line number Diff line change 44 {% for book in model .pagination .items %}
55 <p >{{ book .title }}</p >
66 {% endfor %}
7+ {{ knp_pagination_render(model .pagination ) }}
78{% endblock content %}
You can’t perform that action at this time.
0 commit comments