Skip to content

Commit 06320bb

Browse files
committed
applied changes suggested by review
1 parent 2bfea58 commit 06320bb

File tree

4 files changed

+11
-22
lines changed

4 files changed

+11
-22
lines changed

src/Symfony/Component/Translation/Command/TranslationPullCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Translation\Command;
1313

14+
use Psr\EventDispatcher\EventDispatcherInterface;
1415
use Symfony\Component\Console\Attribute\AsCommand;
1516
use Symfony\Component\Console\Command\Command;
1617
use Symfony\Component\Console\Completion\CompletionInput;
@@ -26,7 +27,6 @@
2627
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
2728
use Symfony\Component\Translation\Reader\TranslationReaderInterface;
2829
use Symfony\Component\Translation\Writer\TranslationWriterInterface;
29-
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
3030

3131
/**
3232
* @author Mathieu Santostefano <msantostefano@protonmail.com>

src/Symfony/Component/Translation/Command/TranslationPushCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Translation\Command;
1313

14+
use Psr\EventDispatcher\EventDispatcherInterface;
1415
use Symfony\Component\Console\Attribute\AsCommand;
1516
use Symfony\Component\Console\Command\Command;
1617
use Symfony\Component\Console\Completion\CompletionInput;
@@ -26,7 +27,6 @@
2627
use Symfony\Component\Translation\Provider\TranslationProviderCollection;
2728
use Symfony\Component\Translation\Reader\TranslationReaderInterface;
2829
use Symfony\Component\Translation\TranslatorBag;
29-
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
3030

3131
/**
3232
* @author Mathieu Santostefano <msantostefano@protonmail.com>

src/Symfony/Component/Translation/Tests/Command/TranslationPullCommandTest.php

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -761,13 +761,7 @@ public static function provideEventDispatchingCommands(): \Generator
761761

762762
private function createCommandTester(ProviderInterface $provider, array $locales = ['en'], array $domains = ['messages'], $defaultLocale = 'en', EventDispatcherInterface $dispatcher = null): CommandTester
763763
{
764-
$command = $this->createCommand(
765-
provider: $provider,
766-
locales: $locales,
767-
domains: $domains,
768-
defaultLocale: $defaultLocale,
769-
dispatcher: $dispatcher
770-
);
764+
$command = $this->createCommand($provider, $locales, $domains, $defaultLocale, ['loco'], $dispatcher);
771765
$application = new Application();
772766
$application->add($command);
773767

@@ -785,13 +779,13 @@ private function createCommand(ProviderInterface $provider, array $locales = ['e
785779
$reader->addLoader('yml', new YamlFileLoader());
786780

787781
return new TranslationPullCommand(
788-
providerCollection: $this->getProviderCollection($provider, $providerNames, $locales, $domains),
789-
writer: $writer,
790-
reader: $reader,
791-
defaultLocale: $defaultLocale,
792-
transPaths: [$this->translationAppDir.'/translations'],
793-
enabledLocales: $locales,
794-
eventDispatcher: $dispatcher
782+
$this->getProviderCollection($provider, $providerNames, $locales, $domains),
783+
$writer,
784+
$reader,
785+
$defaultLocale,
786+
[$this->translationAppDir.'/translations'],
787+
$locales,
788+
$dispatcher
795789
);
796790
}
797791
}

src/Symfony/Component/Translation/Tests/Command/TranslationPushCommandTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,7 @@ public static function provideEventDispatchingCommands(): \Generator
455455

456456
private function createCommandTester(ProviderInterface $provider, array $locales = ['en'], array $domains = ['messages'], EventDispatcherInterface $dispatcher = null): CommandTester
457457
{
458-
$command = $this->createCommand(
459-
provider: $provider,
460-
locales: $locales,
461-
domains: $domains,
462-
dispatcher: $dispatcher
463-
);
458+
$command = $this->createCommand($provider, $locales, $domains, ['loco'], $dispatcher);
464459
$application = new Application();
465460
$application->add($command);
466461

0 commit comments

Comments
 (0)