diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 276c398..1c3ff20 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -11,7 +11,7 @@ return (new PhpCsFixer\Config()) ->setRules([ - '@PSR12' => true, + '@PER-CS' => true, 'array_syntax' => ['syntax' => 'short'], 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'no_unused_imports' => true, diff --git a/composer.json b/composer.json index bb1bf2d..61dea17 100644 --- a/composer.json +++ b/composer.json @@ -14,10 +14,10 @@ "illuminate/support": "^10.0 || ^11.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.50", + "friendsofphp/php-cs-fixer": "^3.64", "orchestra/testbench": "^8.0 || ^9.0", "phpunit/phpunit": "^10.5 || ^11.0", - "vimeo/psalm": "^5.22" + "vimeo/psalm": "^5.26" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/src/Commands/FindMissingTranslations.php b/src/Commands/FindMissingTranslations.php index ff33ce5..95e8133 100644 --- a/src/Commands/FindMissingTranslations.php +++ b/src/Commands/FindMissingTranslations.php @@ -38,7 +38,7 @@ public function handle(): int /** @var string|null $directoryOption */ $directoryOption = $this->option('dir'); - $pathToLocates = match(true) { + $pathToLocates = match (true) { $directoryOption === null => resource_path(self::DEFAULT_LANG_DIRNAME), File::isDirectory($directoryOption) => $directoryOption, File::isDirectory(base_path($directoryOption)) => base_path($directoryOption), @@ -47,7 +47,7 @@ public function handle(): int $baseLocale = $this->option('base') ?: config('app.locale'); assert(is_string($baseLocale), 'Invalid base locale'); - $baseLocaleDirectoryPath = $pathToLocates.\DIRECTORY_SEPARATOR.$baseLocale; + $baseLocaleDirectoryPath = $pathToLocates . \DIRECTORY_SEPARATOR . $baseLocale; $onlyLocales = $this->option('only'); $onlyLocalesArray = $onlyLocales ? explode(',', $onlyLocales) : []; @@ -87,7 +87,7 @@ public function handle(): int $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)); } }