Skip to content

Commit

Permalink
run 8.1 ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Jun 15, 2024
1 parent 32ac722 commit fb4ea49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/Concerns/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function translate(string $country, string $name, ?string $locale = null)
return $name;
}

$locale = $locale ?? $this->defaultLocale();
$locale ??= $this->defaultLocale();

$countryName = $this->toHyphenSeparated($country);

Expand Down
31 changes: 10 additions & 21 deletions src/Countries/France.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,26 +53,15 @@ protected function variableHolidays(int $year): array
/** @return array<string, string> */
protected function regionHolidays(): array
{
switch ($this->region) {
case 'FR-57':
case 'FR-67':
case 'FR-68':
return ['Saint-Étienne' => '12-26'];
case 'FR-971':
case 'FR-MF':
return ['Abolition de l\'esclavage' => '05-27'];
case 'FR-972':
return ['Abolition de l\'esclavage' => '05-22'];
case 'FR-973':
return ['Abolition de l\'esclavage' => '06-10'];
case 'FR-974':
return ['Abolition de l\'esclavage' => '12-20'];
case 'FR-976':
return ['Abolition de l\'esclavage' => '04-27'];
case 'FR-BL':
return ['Abolition de l\'esclavage' => '10-09'];
}

return [];
return match ($this->region) {
'FR-57', 'FR-67', 'FR-68' => ['Saint-Étienne' => '12-26'],
'FR-971', 'FR-MF' => ['Abolition de l\'esclavage' => '05-27'],
'FR-972' => ['Abolition de l\'esclavage' => '05-22'],
'FR-973' => ['Abolition de l\'esclavage' => '06-10'],
'FR-974' => ['Abolition de l\'esclavage' => '12-20'],
'FR-976' => ['Abolition de l\'esclavage' => '04-27'],
'FR-BL' => ['Abolition de l\'esclavage' => '10-09'],
default => [],
};
}
}

0 comments on commit fb4ea49

Please sign in to comment.