mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-09 08:43:13 +08:00
Migrated from standard datetime objects to chronos objects
This commit is contained in:
@@ -12,12 +12,12 @@ class ShortUrlMetaInputFilter extends InputFilter
|
||||
{
|
||||
use InputFactoryTrait;
|
||||
|
||||
const VALID_SINCE = 'validSince';
|
||||
const VALID_UNTIL = 'validUntil';
|
||||
const CUSTOM_SLUG = 'customSlug';
|
||||
const MAX_VISITS = 'maxVisits';
|
||||
public const VALID_SINCE = 'validSince';
|
||||
public const VALID_UNTIL = 'validUntil';
|
||||
public const CUSTOM_SLUG = 'customSlug';
|
||||
public const MAX_VISITS = 'maxVisits';
|
||||
|
||||
public function __construct(array $data = null)
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->initialize();
|
||||
if ($data !== null) {
|
||||
@@ -25,7 +25,7 @@ class ShortUrlMetaInputFilter extends InputFilter
|
||||
}
|
||||
}
|
||||
|
||||
private function initialize()
|
||||
private function initialize(): void
|
||||
{
|
||||
$validSince = $this->createInput(self::VALID_SINCE, false);
|
||||
$validSince->getValidatorChain()->attach(new Date(['format' => \DateTime::ATOM]));
|
||||
|
||||
Reference in New Issue
Block a user