Skip to content

Commit

Permalink
fix and simplify Metadata::getLocales
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Oct 21, 2024
1 parent 5386c5c commit 17c7a7d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Paths/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ private static function retrieveDiocesanSettings(string $diocesan_key, string $s

private static function getLocales(): array
{
$locales = [];
foreach (glob('i18n/*', GLOB_ONLYDIR) as $path) {
$locales[] = pathinfo($path, PATHINFO_FILENAME);
}
return $locales;
return array_map('basename', glob('i18n/*', GLOB_ONLYDIR));
}

/**
Expand Down

0 comments on commit 17c7a7d

Please sign in to comment.