Skip to content

Commit

Permalink
Fix PreciseTime return type
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Dec 12, 2023
1 parent 1c8322e commit 7778b10
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php: ['8.2']
php: ['8.3']
setup: ['stable']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multi-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php: ['8.2']
php: ['8.3']
setup: ['stable']

name: PHP ${{ matrix.php }} - ${{ matrix.setup || 'stable' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3']
php: ['8.2', '8.3', '8.4']
setup: ['lowest', 'stable']

name: PHP ${{ matrix.php }} - ${{ matrix.setup || 'stable' }}
Expand Down
4 changes: 2 additions & 2 deletions src/PreciseTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected function __construct(
parent::__construct(0, 0, $data);
}

public static function fromString(string $string, mixed $data = null, ?DateTimeInterface $date = null): parent
public static function fromString(string $string, mixed $data = null, ?DateTimeInterface $date = null): self
{
if ($date !== null) {
throw new InvalidArgumentException(static::class.' does not support date reference point');
Expand All @@ -36,7 +36,7 @@ public function minutes(): int
return (int) $this->dateTime->format('i');
}

public static function fromDateTime(DateTimeInterface $dateTime, mixed $data = null): parent
public static function fromDateTime(DateTimeInterface $dateTime, mixed $data = null): self
{
return new self($dateTime, $data);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/OpeningHoursTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ public function it_can_handle_timezone_for_date_string($timezone)
$this->assertTrue($openingHours->isOpenOn('2020-10-19'));
}

public function timezones()
public static function timezones(): array
{
return [
['-12:00'],
Expand Down

0 comments on commit 7778b10

Please sign in to comment.