diff --git a/src/Cron/CronExpression.php b/src/Cron/CronExpression.php index 216ce43..7f0dab0 100644 --- a/src/Cron/CronExpression.php +++ b/src/Cron/CronExpression.php @@ -148,7 +148,7 @@ public static function getAliases(): array /** * @deprecated since version 3.0.2, use __construct instead. */ - public static function factory(string $expression, FieldFactoryInterface $fieldFactory = null): CronExpression + public static function factory(string $expression, ?FieldFactoryInterface $fieldFactory = null): CronExpression { /** @phpstan-ignore-next-line */ return new static($expression, $fieldFactory); @@ -179,7 +179,7 @@ public static function isValidExpression(string $expression): bool * @param null|FieldFactoryInterface $fieldFactory Factory to create cron fields * @throws InvalidArgumentException */ - public function __construct(string $expression, FieldFactoryInterface $fieldFactory = null) + public function __construct(string $expression, ?FieldFactoryInterface $fieldFactory = null) { $shortcut = strtolower($expression); $expression = self::$registeredAliases[$shortcut] ?? $expression;