Skip to content

Commit

Permalink
Replace empty() with strict checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Nov 25, 2023
1 parent 61fb282 commit 78578d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/OpeningHours.php
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ protected function getOpeningHoursFromStrings(array $openingHours): OpeningHours

protected function setExceptionsFromStrings(array $exceptions): void
{
if (empty($exceptions)) {
if ($exceptions === []) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/OpeningHoursForDay.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function forNightTime(Time $time): Generator

public function isEmpty(): bool
{
return empty($this->openingHours);
return $this->openingHours === [];
}

public function map(callable $callback): array
Expand Down

0 comments on commit 78578d8

Please sign in to comment.