mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-09 08:14:59 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -18,59 +18,36 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
*/
|
||||
class Page implements PageInterface
|
||||
{
|
||||
/**
|
||||
* the number of item per page.
|
||||
*
|
||||
*/
|
||||
protected int $itemPerPage;
|
||||
|
||||
/**
|
||||
* the number of the current page.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected int $number;
|
||||
|
||||
/**
|
||||
* The route for the current page.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected string $route;
|
||||
|
||||
/**
|
||||
* Parameters for the route to the current page.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected array $routeParameters;
|
||||
|
||||
/**
|
||||
* The number of items in the whole iteration.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected int $totalItems;
|
||||
|
||||
/**
|
||||
* @var UrlGeneratorInterface
|
||||
*/
|
||||
protected $urlGenerator;
|
||||
|
||||
public function __construct(
|
||||
int $number,
|
||||
int $itemPerPage,
|
||||
/**
|
||||
* the number of the current page.
|
||||
*/
|
||||
protected int $number,
|
||||
/**
|
||||
* the number of item per page.
|
||||
*
|
||||
*/
|
||||
protected int $itemPerPage,
|
||||
UrlGeneratorInterface $urlGenerator,
|
||||
string $route,
|
||||
array $routeParameters,
|
||||
int $totalItems
|
||||
/**
|
||||
* The route for the current page.
|
||||
*/
|
||||
protected string $route,
|
||||
/**
|
||||
* Parameters for the route to the current page.
|
||||
*/
|
||||
protected array $routeParameters,
|
||||
/**
|
||||
* The number of items in the whole iteration.
|
||||
*/
|
||||
protected int $totalItems
|
||||
) {
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->number = $number;
|
||||
$this->itemPerPage = $itemPerPage;
|
||||
$this->route = $route;
|
||||
$this->routeParameters = $routeParameters;
|
||||
$this->totalItems = $totalItems;
|
||||
}
|
||||
|
||||
public function generateUrl(): string
|
||||
|
Reference in New Issue
Block a user