Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze authored and github-actions[bot] committed Jan 12, 2024
1 parent a2a467e commit 54dbbf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Countries/Belgium.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ protected function variableHolidays(int $year): array
'Pinkstermaandag' => $easter->addDays(50),
];
}

}
7 changes: 3 additions & 4 deletions src/Countries/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@ public static function find(string $countryCode): ?Country
{
$countryCode = strtolower($countryCode);

foreach (glob(__DIR__ . '/../Countries/*.php') as $filename) {
foreach (glob(__DIR__.'/../Countries/*.php') as $filename) {
if (basename($filename) === 'Country.php') {
continue;
}

// determine class name from file name
$countryClass = "\\Spatie\\Holidays\\Countries\\" . basename($filename, '.php');
$countryClass = '\\Spatie\\Holidays\\Countries\\'.basename($filename, '.php');

/** @var \Spatie\Holidays\Countries\Country $country */
$country = new $countryClass;


if (strtolower($country->countryCode()) === $countryCode) {
return $country;
}
Expand All @@ -30,7 +29,7 @@ public static function find(string $countryCode): ?Country
return null;
}

abstract function countryCode(): string;
abstract public function countryCode(): string;

abstract public function get(int $year): array;

Expand Down

0 comments on commit 54dbbf4

Please sign in to comment.