From 188e4afa4cd1037b9c2b931159b59167c1b78898 Mon Sep 17 00:00:00 2001 From: alies-dev Date: Thu, 25 Apr 2024 18:48:10 +0000 Subject: [PATCH] Fix styling --- src/Commands/FindMissingTranslations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Commands/FindMissingTranslations.php b/src/Commands/FindMissingTranslations.php index 962dbec..ff33ce5 100644 --- a/src/Commands/FindMissingTranslations.php +++ b/src/Commands/FindMissingTranslations.php @@ -66,7 +66,7 @@ public function handle(): int if ($isDirectoryForBaseLocale) { continue; } - if (count($onlyLocalesArray) > 0 && !in_array($currentLocale, $onlyLocalesArray, true)) { + if (count($onlyLocalesArray) > 0 && ! in_array($currentLocale, $onlyLocalesArray, true)) { continue; } if (in_array($currentLocale, $excludeLocalesArray, true)) { @@ -81,12 +81,13 @@ public function handle(): int if (count($onlyLocalesArray) > 0) { $locales = array_map(function ($currentLocaleDirectoryPath) { preg_match('/(\w{2})$/', $currentLocaleDirectoryPath, $matchedParts); + return $matchedParts[0]; }, $localeDirectories); $localesMissing = array_values(array_diff($onlyLocalesArray, $locales)); if (count($localesMissing) > 0) { $this->error('The following locales are missing:', 'q'); - $this->table(['locale'], array_map(fn($locale) => [$locale], $localesMissing)); + $this->table(['locale'], array_map(fn ($locale) => [$locale], $localesMissing)); } }