Passed
Pull Request — develop (#19)
by Kevin
02:49
created

ConfigurationList::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 11
loc 11
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Magium\Configuration\Console\Command;
4
5
use Magium\Configuration\Config\Config;
6
use Magium\Configuration\MagiumConfigurationFactory;
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputArgument;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12 View Code Duplication
class ConfigurationList extends Command
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
15
    const COMMAND = 'magium:configuration:list';
16
17 1
    protected function configure()
18
    {
19
        $this
20 1
            ->setName(self::COMMAND)
21 1
            ->setDescription('List configuration settings')
22 1
            ->setHelp("This command lists all of the configuration setting values for the specified context, or 'default' if the context is not provided")
23
        ;
24
25 1
        $this->addArgument('path', InputArgument::REQUIRED, 'Configuration Path');
26 1
        $this->addArgument('context', InputArgument::OPTIONAL, 'Configuration Context', Config::CONTEXT_DEFAULT);
27 1
    }
28
29
    protected function execute(InputInterface $input, OutputInterface $output)
30
    {
31
        $factory = new MagiumConfigurationFactory();
32
        $factory->getBuilder();
33
    }
34
35
}
36