Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach authored and github-actions[bot] committed Feb 21, 2024
1 parent 7a0a8ef commit df81e49
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/Calendars/IslamicCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Countries/Bahrain.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/Countries/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function convertPeriods(
if ($index === 0) {
$formattedSuffix = '';
} else {
$formattedSuffix = " {$suffix} " . $index+1;
$formattedSuffix = " {$suffix} ".$index + 1;
}

$holidayName = "{$prefix}{$name}{$formattedSuffix}";
Expand Down
20 changes: 7 additions & 13 deletions src/Countries/Turkey.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}

Expand Down
1 change: 0 additions & 1 deletion tests/HolidaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit df81e49

Please sign in to comment.