DumpCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 5
dl 0
loc 29
ccs 6
cts 9
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 8 1
A execute() 0 4 1
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