Skip to content

Commit

Permalink
explicitly mark nullable parameters as nullable (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh authored Apr 12, 2024
1 parent 102b869 commit 0b6a90e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cron/CronExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0b6a90e

Please # to comment.