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

StaticCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
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