mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 08:43:13 +08:00
Migrated all constructor props to property promotion when possible
This commit is contained in:
@@ -14,20 +14,16 @@ final class VisitsParams
|
||||
private const ALL_ITEMS = -1;
|
||||
|
||||
private ?DateRange $dateRange;
|
||||
private int $page;
|
||||
private int $itemsPerPage;
|
||||
private bool $excludeBots;
|
||||
|
||||
public function __construct(
|
||||
?DateRange $dateRange = null,
|
||||
int $page = self::FIRST_PAGE,
|
||||
private int $page = self::FIRST_PAGE,
|
||||
?int $itemsPerPage = null,
|
||||
bool $excludeBots = false
|
||||
private bool $excludeBots = false
|
||||
) {
|
||||
$this->dateRange = $dateRange ?? new DateRange();
|
||||
$this->page = $page;
|
||||
$this->itemsPerPage = $this->determineItemsPerPage($itemsPerPage);
|
||||
$this->excludeBots = $excludeBots;
|
||||
}
|
||||
|
||||
private function determineItemsPerPage(?int $itemsPerPage): int
|
||||
|
||||
Reference in New Issue
Block a user