DownloadCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 20
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A execute() 0 5 1
1
<?php
2
3
namespace Happyr\TranslationBundle\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * This command is good to run before you ship your code to production.
11
 */
12
class DownloadCommand extends ContainerAwareCommand
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    protected function configure()
18
    {
19
        $this
20
            ->setName('happyr:translation:download')
21
            ->setDescription('Replace your local files with the latest from your translation SaaS.');
22
    }
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function execute(InputInterface $input, OutputInterface $output)
27
    {
28
        $this->getContainer()->get('happyr.translation')->downloadAllTranslations();
29
        $output->writeln('Download complete');
30
    }
31
}
32