Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Nov 5, 2023
1 parent 0fad569 commit ec98d90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DateTimeRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ protected function __construct(DateTimeInterface $date, Time $start, Time $end,
$start > $date->format(self::TIME_FORMAT)
? ' - 1 day'
: ''
));
));
$endDate = $this->copyAndModify($date, $end.(
$end < $date->format(self::TIME_FORMAT)
? ' + 1 day'
: ''
));
));
parent::__construct(
Time::fromString($start, $start->getData(), $startDate),
Time::fromString($end, $start->getData(), $endDate),
Expand Down
2 changes: 1 addition & 1 deletion src/OpeningHours.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function setDateTimeClass(?string $dateTimeClass = null): self
*
* Replace the whole metadata handled by OpeningHours.
*
* @param $data
* @param $data
* @return $this
*/
public function setData($data): self
Expand Down
2 changes: 1 addition & 1 deletion src/Time.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function format(string $format = self::TIME_FORMAT, $timezone = null): st
return '24:00'.(strlen($format) > 3
? ($date ?? new DateTimeImmutable('1970-01-01 00:00:00'))->format(substr($format, 3))
: ''
);
);
}

return $this->toDateTime($date)->format($format);
Expand Down
1 change: 1 addition & 0 deletions tests/OpeningHoursTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ public function it_can_set_the_timezone_on_the_openings_hours_object()

/**
* @test
*
* @dataProvider timezones
*/
public function it_can_handle_timezone_for_date_string($timezone)
Expand Down

0 comments on commit ec98d90

Please sign in to comment.