mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Generalize VisitsDateRangeInput to VisitsListInput to add more common params
This commit is contained in:
@@ -10,7 +10,7 @@ use Symfony\Component\Console\Attribute\Option;
|
||||
use function Shlinkio\Shlink\Common\buildDateRange;
|
||||
use function Shlinkio\Shlink\Core\normalizeOptionalDate;
|
||||
|
||||
class VisitsDateRangeInput
|
||||
class VisitsListInput
|
||||
{
|
||||
#[Option('Only return visits older than this date', shortcut: 's')]
|
||||
public string|null $startDate = null;
|
||||
@@ -18,7 +18,7 @@ class VisitsDateRangeInput
|
||||
#[Option('Only return visits newer than this date', shortcut: 'e')]
|
||||
public string|null $endDate = null;
|
||||
|
||||
public function toDateRange(): DateRange
|
||||
public function dateRange(): DateRange
|
||||
{
|
||||
return buildDateRange(
|
||||
startDate: normalizeOptionalDate($this->startDate),
|
||||
Reference in New Issue
Block a user