Code Duplication    Length = 5-5 lines in 2 locations

Command/ExtractCommand.php 1 location

@@ 42-46 (lines=5) @@
39
        $config = $this->getContainer()->get('php_translation.configuration_manager')->getConfiguration($input->getArgument('configuration'));
40
        $importer = $this->getContainer()->get('php_translation.importer');
41
42
        if ($inputLocale = $input->getArgument('locale')) {
43
            $locales = [$inputLocale];
44
        } else {
45
            $locales = $this->getContainer()->getParameter('php_translation.locales');
46
        }
47
48
        $transPaths = array_merge($config['external_translations_dirs'], [$config['output_dir']]);
49
        $catalogues = $this->getContainer()->get('php_translation.catalogue_fetcher')->getCatalogues($locales, $transPaths);

Command/DeleteObsoleteCommand.php 1 location

@@ 43-47 (lines=5) @@
40
    {
41
        $configName = $input->getArgument('configuration');
42
        $config = $this->getContainer()->get('php_translation.configuration_manager')->getConfiguration($configName);
43
        if (null !== $inputLocale = $input->getArgument('locale', null)) {
44
            $locales = [$inputLocale];
45
        } else {
46
            $locales = $this->getContainer()->getParameter('php_translation.locales');
47
        }
48
49
        $transPaths = array_merge($config['external_translations_dirs'], [$config['output_dir']]);
50
        $catalogueManager = $this->getContainer()->get('php_translation.catalogue_manager');