mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-07 15:53:13 +08:00
Updated to readonly public props on as many models as possible
This commit is contained in:
@@ -10,13 +10,13 @@ use function Shlinkio\Shlink\Core\parseDateRangeFromQuery;
|
||||
|
||||
final class VisitsParams extends AbstractInfinitePaginableListParams
|
||||
{
|
||||
private DateRange $dateRange;
|
||||
public readonly DateRange $dateRange;
|
||||
|
||||
public function __construct(
|
||||
?DateRange $dateRange = null,
|
||||
?int $page = null,
|
||||
?int $itemsPerPage = null,
|
||||
private bool $excludeBots = false,
|
||||
public readonly bool $excludeBots = false,
|
||||
) {
|
||||
parent::__construct($page, $itemsPerPage);
|
||||
$this->dateRange = $dateRange ?? DateRange::emptyInstance();
|
||||
@@ -31,14 +31,4 @@ final class VisitsParams extends AbstractInfinitePaginableListParams
|
||||
isset($query['excludeBots']),
|
||||
);
|
||||
}
|
||||
|
||||
public function getDateRange(): DateRange
|
||||
{
|
||||
return $this->dateRange;
|
||||
}
|
||||
|
||||
public function excludeBots(): bool
|
||||
{
|
||||
return $this->excludeBots;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user