From d8214608fe6aa0b44f6060ffba79c816f9e94032 Mon Sep 17 00:00:00 2001 From: Nielsvanpach Date: Thu, 1 Feb 2024 09:53:48 +0000 Subject: [PATCH] Fix styling --- src/Countries/Iran.php | 6 ++---- tests/Countries/IranTest.php | 10 +++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Countries/Iran.php b/src/Countries/Iran.php index 981f5e618..a70be6c58 100644 --- a/src/Countries/Iran.php +++ b/src/Countries/Iran.php @@ -2,15 +2,13 @@ namespace Spatie\Holidays\Countries; -use Carbon\CarbonImmutable; - class Iran extends Country { public function countryCode(): string { return 'ir'; } - + protected function allHolidays(int $year): array { return [ @@ -26,4 +24,4 @@ protected function allHolidays(int $year): array 'قیام ۱۵ خرداد' => '06-04', ]; } -} \ No newline at end of file +} diff --git a/tests/Countries/IranTest.php b/tests/Countries/IranTest.php index 7ceb54944..0c5c23f04 100644 --- a/tests/Countries/IranTest.php +++ b/tests/Countries/IranTest.php @@ -7,20 +7,20 @@ it('can calculate iran holidays', function () { CarbonImmutable::setTestNow('2024-01-01'); - + $holidays = Holidays::for(country: 'ir')->get(); - + expect($holidays) ->toBeArray() ->not()->toBeEmpty(); - + expect(formatDates($holidays))->toMatchSnapshot(); }); it('can calculate iran holidays in local', function (string $locale, string $newYearsDayName) { CarbonImmutable::setTestNow('2024-01-01'); $result = Holidays::for(country: 'ir', year: null, locale: $locale)->get(); - + expect($result)->toBeArray(); expect($result[7]['name'])->toBe($newYearsDayName); })->with( @@ -28,4 +28,4 @@ ['en', 'Sizdah Bedar'], ['fa', 'سیزده بدر'], ] -); \ No newline at end of file +);