Passed
Push — master ( 9f96f6...0f86e3 )
by Dev
12:11 queued 07:09
created

StaticCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 22
ccs 0
cts 16
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 4 1
A configure() 0 5 1
1
<?php
2
3
namespace PiedWeb\CMSBundle\Command;
4
5
use PiedWeb\CMSBundle\Service\StaticService;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class StaticCommand extends Command
11
{
12
    private $static;
13
14
    public function __construct(StaticService $static)
15
    {
16
        parent::__construct();
17
        $this->static = $static;
18
    }
19
20
    protected function configure()
21
    {
22
        $this
23
            ->setName('static:generate')
24
            ->setDescription('Generate static version  for your website')
25
        ;
26
    }
27
28
    protected function execute(InputInterface $input, OutputInterface $output)
29
    {
30
        $this->static->dump();
31
        $output->writeln('Static version generation succeeded.');
32
    }
33
}
34