diff --git a/src/Calendars/IslamicCalendar.php b/src/Calendars/IslamicCalendar.php index 937eb33a..223c377d 100644 --- a/src/Calendars/IslamicCalendar.php +++ b/src/Calendars/IslamicCalendar.php @@ -4,7 +4,6 @@ use Carbon\CarbonImmutable; use Carbon\CarbonPeriod; -use RuntimeException; use Spatie\Holidays\Countries\Country; use Spatie\Holidays\Exceptions\InvalidYear; @@ -50,7 +49,7 @@ protected function getHoliday(array $collection, int $year, int $totalDays): Car foreach ($dates as $date) { $start = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); - $end = $start->addDays($totalDays-1)->startOfDay(); + $end = $start->addDays($totalDays - 1)->startOfDay(); $periods[] = CarbonPeriod::create($start, '1 day', $end); } @@ -60,7 +59,7 @@ protected function getHoliday(array $collection, int $year, int $totalDays): Car protected function getOverlapping(array $collection, int $year, $totalDays): ?string { try { - $date = $collection[$year-1]; + $date = $collection[$year - 1]; } catch (\Exception) { throw InvalidYear::range($this->countryCode(), 1970, 2037); } @@ -70,7 +69,7 @@ protected function getOverlapping(array $collection, int $year, $totalDays): ?st } $start = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); - $end = $start->addDays($totalDays-1)->startOfDay(); + $end = $start->addDays($totalDays - 1)->startOfDay(); if ($end->year !== $year) { return $date;