diff --git a/src/Calendars/IslamicCalendar.php b/src/Calendars/IslamicCalendar.php index 926a6f17..d3af071c 100644 --- a/src/Calendars/IslamicCalendar.php +++ b/src/Calendars/IslamicCalendar.php @@ -20,7 +20,7 @@ public function eidAlFitr(int $year, int $totalDays = 3): CarbonPeriod } $start = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); - $end = $start->addDays($totalDays-1)->startOfDay(); + $end = $start->addDays($totalDays - 1)->startOfDay(); return CarbonPeriod::create($start, '1 day', $end); } @@ -34,7 +34,7 @@ public function eidAlAdha(int $year, int $totalDays = 4): CarbonPeriod } $start = CarbonImmutable::createFromFormat('Y-m-d', "{$year}-{$date}")->startOfDay(); - $end = $start->addDays($totalDays-1)->startOfDay(); + $end = $start->addDays($totalDays - 1)->startOfDay(); return CarbonPeriod::create($start, '1 day', $end); } diff --git a/src/Countries/Bahrain.php b/src/Countries/Bahrain.php index e8eb5fe9..66e2942f 100644 --- a/src/Countries/Bahrain.php +++ b/src/Countries/Bahrain.php @@ -4,17 +4,17 @@ use Carbon\CarbonImmutable; use Carbon\CarbonInterface; -use Spatie\Holidays\Concerns\Translatable; -use Spatie\Holidays\Contracts\HasTranslations; use Carbon\CarbonPeriod; use RuntimeException; use Spatie\Holidays\Calendars\IslamicCalendar; +use Spatie\Holidays\Concerns\Translatable; +use Spatie\Holidays\Contracts\HasTranslations; use Spatie\Holidays\Exceptions\InvalidYear; class Bahrain extends Country implements HasTranslations { - use Translatable; use IslamicCalendar; + use Translatable; protected const eidAlFitr = [ 2020 => '05-24', diff --git a/src/Countries/Country.php b/src/Countries/Country.php index 2e6ca480..ebcec46f 100644 --- a/src/Countries/Country.php +++ b/src/Countries/Country.php @@ -135,7 +135,7 @@ protected function convertPeriods( if ($index === 0) { $formattedSuffix = ''; } else { - $formattedSuffix = " {$suffix} " . $index+1; + $formattedSuffix = " {$suffix} ".$index + 1; } $holidayName = "{$prefix}{$name}{$formattedSuffix}"; diff --git a/src/Countries/Turkey.php b/src/Countries/Turkey.php index c71ff040..a50d14b6 100644 --- a/src/Countries/Turkey.php +++ b/src/Countries/Turkey.php @@ -2,18 +2,12 @@ namespace Spatie\Holidays\Countries; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterface; -use Carbon\CarbonInterval; -use Carbon\CarbonPeriod; -use RuntimeException; use Spatie\Holidays\Calendars\IslamicCalendar; use Spatie\Holidays\Concerns\Translatable; use Spatie\Holidays\Contracts\HasTranslations; use Spatie\Holidays\Contracts\Islamic; -use Spatie\Holidays\Exceptions\InvalidYear; -class Turkey extends Country implements Islamic, HasTranslations +class Turkey extends Country implements HasTranslations, Islamic { use IslamicCalendar; use Translatable; @@ -204,12 +198,12 @@ protected function allHolidays(int $year): array } return array_merge([ - "New Year's Day" => "01-01", - "National Sovereignty and Children's Day" => "04-23", - "Commemoration of Atatürk, Youth and Sports Day" => "05-19", - "Victory Day" => "08-30", - "Republic Day Eve" => "10-28", - "Republic Day" => "10-29", + "New Year's Day" => '01-01', + "National Sovereignty and Children's Day" => '04-23', + 'Commemoration of Atatürk, Youth and Sports Day' => '05-19', + 'Victory Day' => '08-30', + 'Republic Day Eve' => '10-28', + 'Republic Day' => '10-29', ], $newHolidays, $this->islamicHolidays($year)); } diff --git a/tests/HolidaysTest.php b/tests/HolidaysTest.php index b18a5c72..3d2c6b0f 100644 --- a/tests/HolidaysTest.php +++ b/tests/HolidaysTest.php @@ -4,7 +4,6 @@ use Spatie\Holidays\Countries\Belgium; use Spatie\Holidays\Countries\Netherlands; use Spatie\Holidays\Exceptions\InvalidCountry; -use Spatie\Holidays\Exceptions\InvalidLocale; use Spatie\Holidays\Exceptions\InvalidYear; use Spatie\Holidays\Holidays;