mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 07:14:58 +00:00
DX: fix phpstan errors
This commit is contained in:
@@ -32,26 +32,26 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function countPages();
|
||||
public function countPages(): int;
|
||||
|
||||
/**
|
||||
* get the current page.
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getCurrentPage();
|
||||
public function getCurrentPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get the first result for the current page.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getCurrentPageFirstItemNumber();
|
||||
public function getCurrentPageFirstItemNumber(): int;
|
||||
|
||||
/*
|
||||
* get the number of items per page
|
||||
*/
|
||||
public function getItemsPerPage();
|
||||
public function getItemsPerPage(): int;
|
||||
|
||||
/**
|
||||
* get the next page.
|
||||
@@ -60,7 +60,7 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getNextPage();
|
||||
public function getNextPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get page by his number.
|
||||
@@ -69,14 +69,14 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @throws RuntimeException if the pagination has no page with specified number
|
||||
*/
|
||||
public function getPage($number);
|
||||
public function getPage(int $number): PageInterface;
|
||||
|
||||
/**
|
||||
* get a generator to generate pages.
|
||||
*
|
||||
* @return Generator which return PageInterface elements
|
||||
*/
|
||||
public function getPagesGenerator();
|
||||
public function getPagesGenerator(): iterable;
|
||||
|
||||
/**
|
||||
* get the previous page.
|
||||
@@ -85,35 +85,34 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return PageInterface
|
||||
*/
|
||||
public function getPreviousPage();
|
||||
public function getPreviousPage(): PageInterface;
|
||||
|
||||
/**
|
||||
* get the number of results for this paginator.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTotalItems();
|
||||
public function getTotalItems(): int;
|
||||
|
||||
/**
|
||||
* check if the current page has a next page.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasNextPage();
|
||||
public function hasNextPage(): bool;
|
||||
|
||||
/**
|
||||
* check if the page with the given number exists.
|
||||
*
|
||||
* @param int $number
|
||||
*/
|
||||
public function hasPage($number);
|
||||
public function hasPage($number): bool;
|
||||
|
||||
/**
|
||||
* check if the current page has a page before.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPreviousPage();
|
||||
public function hasPreviousPage(): bool;
|
||||
|
||||
/**
|
||||
* check if the given page is the current page.
|
||||
@@ -122,10 +121,10 @@ interface PaginatorInterface extends Countable
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isCurrentPage(PageInterface $page);
|
||||
public function isCurrentPage(PageInterface $page): bool;
|
||||
|
||||
/*
|
||||
* set the number of items per page
|
||||
*/
|
||||
public function setItemsPerPage($itemsPerPage);
|
||||
public function setItemsPerPage(int $itemsPerPage);
|
||||
}
|
||||
|
Reference in New Issue
Block a user