Skip to content

Commit f487701

Browse files
Merge branch '6.3' into 6.4
* 6.3: minor #53524 [Messenger] [AmazonSqs] Allow `async-aws/sqs` version 2 (smoench) Fix bad merge List CS fix in .git-blame-ignore-revs Fix implicitly-required parameters List CS fix in .git-blame-ignore-revs Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
2 parents 0639710 + b0fd66f commit f487701

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

DatePoint.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ final class DatePoint extends \DateTimeImmutable
2121
/**
2222
* @throws \DateMalformedStringException When $datetime is invalid
2323
*/
24-
public function __construct(string $datetime = 'now', \DateTimeZone $timezone = null, parent $reference = null)
24+
public function __construct(string $datetime = 'now', ?\DateTimeZone $timezone = null, ?parent $reference = null)
2525
{
2626
$now = $reference ?? Clock::get()->now();
2727

@@ -61,7 +61,7 @@ public function __construct(string $datetime = 'now', \DateTimeZone $timezone =
6161
/**
6262
* @throws \DateMalformedStringException When $format or $datetime are invalid
6363
*/
64-
public static function createFromFormat(string $format, string $datetime, \DateTimeZone $timezone = null): static
64+
public static function createFromFormat(string $format, string $datetime, ?\DateTimeZone $timezone = null): static
6565
{
6666
return parent::createFromFormat($format, $datetime, $timezone) ?: throw new \DateMalformedStringException(static::getLastErrors()['errors'][0] ?? 'Invalid date string or format.');
6767
}

MockClock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class MockClock implements ClockInterface
2626
* @throws \DateMalformedStringException When $now is invalid
2727
* @throws \DateInvalidTimeZoneException When $timezone is invalid
2828
*/
29-
public function __construct(\DateTimeImmutable|string $now = 'now', \DateTimeZone|string $timezone = null)
29+
public function __construct(\DateTimeImmutable|string $now = 'now', \DateTimeZone|string|null $timezone = null)
3030
{
3131
if (\PHP_VERSION_ID >= 80300 && \is_string($timezone)) {
3232
$timezone = new \DateTimeZone($timezone);

MonotonicClock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class MonotonicClock implements ClockInterface
2525
/**
2626
* @throws \DateInvalidTimeZoneException When $timezone is invalid
2727
*/
28-
public function __construct(\DateTimeZone|string $timezone = null)
28+
public function __construct(\DateTimeZone|string|null $timezone = null)
2929
{
3030
if (false === $offset = hrtime()) {
3131
throw new \RuntimeException('hrtime() returned false: the runtime environment does not provide access to a monotonic timer.');

NativeClock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class NativeClock implements ClockInterface
2323
/**
2424
* @throws \DateInvalidTimeZoneException When $timezone is invalid
2525
*/
26-
public function __construct(\DateTimeZone|string $timezone = null)
26+
public function __construct(\DateTimeZone|string|null $timezone = null)
2727
{
2828
$this->timezone = \is_string($timezone ??= date_default_timezone_get()) ? $this->withTimeZone($timezone)->timezone : $timezone;
2929
}

0 commit comments

Comments
 (0)