Test Failed
Pull Request — master (#448)
by
unknown
05:18
created

DumpCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 35
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
A execute() 0 14 1
1
<?php
2
/*
3
 * This file is part of the Magallanes package.
4
 *
5
 * (c) Andrés Montañez <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Mage\Command\BuiltIn\Config;
12
13
use Symfony\Component\Console\Input\InputInterface;
14
use Symfony\Component\Console\Output\OutputInterface;
15
use Mage\Command\AbstractCommand;
16
17
/**
18
 * Command for Dumping the Configuration
19
 *
20
 * @author Andrés Montañez <[email protected]>
21
 */
22
class DumpCommand extends AbstractCommand
23
{
24
    /**
25
     * Configure the Command
26
     */
27
    protected function configure()
28
    {
29
        $this
30
            ->setName('config:dump')
31
            ->setDescription('Dumps the Magallanes configuration')
32
        ;
33
    }
34
35
    /**
36
     * Execute the Command
37
     *
38
     * @param InputInterface $input
39
     * @param OutputInterface $output
40
     * @return int|mixed
41
     */
42
    protected function execute(InputInterface $input, OutputInterface $output)
43
    {
44
        $this->requireConfig();
45
46
        $output->writeln('Starting <fg=blue>Magallanes</>');
47
        $output->writeln('');
48
49
        $output->writeln(sprintf('<comment>%s</comment>', var_export($this->runtime->getConfiguration(), true)));
50
51
        $output->writeln('');
52
        $output->writeln('Finished <fg=blue>Magallanes</>');
53
54
        return 0;
55
    }
56
}
57