Completed
Push — development ( 4cbc56...9c238f )
by Thomas
27s
created

ImportLegacyTranslationCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 4
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/***************************************************************************
3
 * For license information see LICENSE.md
4
 ***************************************************************************/
5
6
namespace AppBundle\Command;
7
8
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
/**
13
 * very quick and dirty solution to import crowdin snippets into the legacy translation system
14
 */
15 View Code Duplication
class ImportLegacyTranslationCommand extends ContainerAwareCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
16
{
17
    const COMMAND_NAME = 'translation:update-legacy-translation';
18
19
    protected function configure()
20
    {
21
        parent::configure();
22
23
        $this
24
            ->setName(self::COMMAND_NAME)
25
            ->setDescription('import translation from crowdin into legacy translation system');
26
    }
27
28
    protected function execute(InputInterface $input, OutputInterface $output)
29
    {
30
        $this->getContainer()->get('oc.translation.crowdin_import')->importTranslations();
31
    }
32
}
33