DumpCommand::execute()   A
last analyzed

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 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * @author Gerard van Helden <[email protected]>
4
 * @copyright Zicht Online <http://zicht.nl>
5
 */
6
namespace Zicht\Tool\Command;
7
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Input\InputArgument;
10
use Symfony\Component\Console\Output\OutputInterface;
11
use Symfony\Component\Yaml\Yaml;
12
13
/**
14
 * Dumps the container
15
 */
16
class DumpCommand extends BaseCommand
17
{
18
    /**
19
     * Configures the command
20
     *
21
     * @return void
22
     */
23 1
    protected function configure()
24
    {
25 1
        $this
26 1
            ->setName('z:dump')
27 1
            ->setHelp('Dumps container values')
28 1
            ->setDescription('Dumps container values')
29
        ;
30 1
    }
31
32
33
    /**
34
     * Executes the command
35
     *
36
     * @param InputInterface $input
37
     * @param OutputInterface $output
38
     * @return void
39
     */
40
    protected function execute(InputInterface $input, OutputInterface $output)
41
    {
42
        $output->writeln(Yaml::dump($this->getContainer()->getValues(), 5, 4));
43
    }
44
}
45