Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
alies-dev authored and github-actions[bot] committed Apr 25, 2024
1 parent 40ceab7 commit 188e4af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/FindMissingTranslations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -81,12 +81,13 @@ public function handle(): int
if (count($onlyLocalesArray) > 0) {
$locales = array_map(function ($currentLocaleDirectoryPath) {
preg_match('/(\w{2})$/', $currentLocaleDirectoryPath, $matchedParts);

Check failure on line 83 in src/Commands/FindMissingTranslations.php

View workflow job for this annotation

GitHub Actions / psalm

MixedArgument

src/Commands/FindMissingTranslations.php:83:42: MixedArgument: Argument 2 of preg_match cannot be mixed, expecting string (see https://psalm.dev/030)

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));
}
}

Expand Down

0 comments on commit 188e4af

Please sign in to comment.