Passed
Branch master (a0cc06)
by Dāvis
17:06
created

TranslationsGenerateCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
rs 9.4285
c 1
b 0
f 1
1
<?php
2
3
namespace Sludio\HelperBundle\Translatable\Command;
4
5
use Sludio\HelperBundle\Translatable\Repository\TranslatableRepository as Sludio;
6
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class TranslationsGenerateCommand extends ContainerAwareCommand
11
{
12
    protected function configure()
13
    {
14
        $this->setName('sludio:translations:generate')->setDescription('Regenerate translations');
15
    }
16
17
    protected function execute(InputInterface $input, OutputInterface $output)
18
    {
19
        $output->writeln('Starting generation...');
20
        Sludio::getAllTranslations();
21
        $output->writeln('Translations generated!');
22
    }
23
}
24