Code Duplication    Length = 33-34 lines in 3 locations

htdocs/src/Oc/Command/ExportLegacyTranslationCommand.php 1 location

@@ 19-51 (lines=33) @@
16
 *
17
 * @package Oc\Command
18
 */
19
class ExportLegacyTranslationCommand extends ContainerAwareCommand
20
{
21
    const COMMAND_NAME = 'translation:export-legacy-translation';
22
23
    /**
24
     * Configures the command.
25
     *
26
     * @return void
27
     *
28
     * @throws InvalidArgumentException
29
     */
30
    protected function configure()
31
    {
32
        parent::configure();
33
34
        $this
35
            ->setName(self::COMMAND_NAME)
36
            ->setDescription('export translation legacy translation system to crowdin');
37
    }
38
39
    /**
40
     * Executes the command.
41
     *
42
     * @param InputInterface $input
43
     * @param OutputInterface $output
44
     *
45
     * @return int|null
46
     */
47
    protected function execute(InputInterface $input, OutputInterface $output)
48
    {
49
        $this->getContainer()->get(CrowdinExport::class)->exportTranslations();
50
    }
51
}
52

htdocs/src/Oc/Command/ImportLegacyTranslationCommand.php 1 location

@@ 21-53 (lines=33) @@
18
 *
19
 * @package Oc\Command
20
 */
21
class ImportLegacyTranslationCommand extends ContainerAwareCommand
22
{
23
    const COMMAND_NAME = 'translation:import-legacy-translation';
24
25
    /**
26
     * Configures the command.
27
     *
28
     * @return void
29
     *
30
     * @throws InvalidArgumentException
31
     */
32
    protected function configure()
33
    {
34
        parent::configure();
35
36
        $this
37
            ->setName(self::COMMAND_NAME)
38
            ->setDescription('import translation from crowdin into legacy translation system');
39
    }
40
41
    /**
42
     * Executes the command.
43
     *
44
     * @param InputInterface $input
45
     * @param OutputInterface $output
46
     *
47
     * @return int|null
48
     */
49
    protected function execute(InputInterface $input, OutputInterface $output)
50
    {
51
        $this->getContainer()->get(CrowdinImport::class)->importTranslations();
52
    }
53
}
54

htdocs/src/Oc/Command/JournaldPostfixLogsCommand.php 1 location

@@ 19-52 (lines=34) @@
16
 *
17
 * @package Oc\Command
18
 */
19
class JournaldPostfixLogsCommand extends ContainerAwareCommand
20
{
21
    const COMMAND_NAME = 'postfix:processing-logs';
22
23
    /**
24
     * Configures the command.
25
     *
26
     * @return void
27
     *
28
     * @throws InvalidArgumentException
29
     */
30
    protected function configure()
31
    {
32
        parent::configure();
33
34
        $this
35
            ->setName(self::COMMAND_NAME)
36
            ->setDescription('process postfix logs for support');
37
    }
38
39
    /**
40
     * Executes the command.
41
     *
42
     * @param InputInterface $input
43
     * @param OutputInterface $output
44
     *
45
     * @return int|null
46
     */
47
    protected function execute(InputInterface $input, OutputInterface $output)
48
    {
49
        $journal = $this->getContainer()->get(JournalLogs::class);
50
        $journal->processJournalLogs();
51
    }
52
}
53