Skip to content

Commit a8b4a0a

Browse files
committed
grammar
1 parent f1ad42d commit a8b4a0a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Commands/FixGrammarTranslationsCommand.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@ class FixGrammarTranslationsCommand extends Command
1616
public function handle(): int
1717
{
1818
$serviceArg = $this->option('service');
19-
$localesArg = explode(",", (string) $this->option('locales'));
19+
$localesArg = explode(',', (string) $this->option('locales'));
2020

2121
$service = TranslatorServiceProvider::getGrammarServiceFromConfig($serviceArg);
2222

2323
$locales = collect(Translator::getLanguages())
2424
->when($localesArg, fn (Collection $items) => $items->intersect($localesArg));
2525

26-
2726
foreach ($locales as $locale) {
2827

2928
$this->info("Fixing grammar in '{$locale}' locale:");
30-
$this->line('Using service ' . get_class($service));
29+
$this->line('Using service '.get_class($service));
3130

3231
$namespaces = Translator::getNamespaces($locale);
3332

@@ -38,8 +37,8 @@ public function handle(): int
3837
->keys()
3938
->toArray();
4039

41-
$this->line(count($keys) . " keys to fix found in {$locale}/{$namespace}.php");
42-
if (!$this->confirm("Would you like to continue?", true)) {
40+
$this->line(count($keys)." keys to fix found in {$locale}/{$namespace}.php");
41+
if (! $this->confirm('Would you like to continue?', true)) {
4342
continue;
4443
}
4544

src/Commands/TranslateTranslationsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function handle(): int
3131

3232
$this->info("Translating from '{$from}' to '{$target}':");
3333
if ($service) {
34-
$this->line('Using custom service ' . get_class($service));
34+
$this->line('Using custom service '.get_class($service));
3535
}
3636

3737
foreach ($namespaces as $namespace) {
@@ -42,7 +42,7 @@ public function handle(): int
4242
$keys = Translator::getMissingTranslations($from, $target, $namespace);
4343
}
4444

45-
if (!$this->confirm(count($keys) . " keys to translate found in {$target}/{$namespace}.php, would you like to continue?", true)) {
45+
if (! $this->confirm(count($keys)." keys to translate found in {$target}/{$namespace}.php, would you like to continue?", true)) {
4646
continue;
4747
}
4848

0 commit comments

Comments
 (0)