Passed
Pull Request — develop (#18)
by Kevin
03:58 queued 41s
created

ConfigurationList::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
dl 5
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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
    protected function configure()
18
    {
19
        $this
20
            ->setName(self::COMMAND)
21
            ->setDescription('List configuration settings')
22
            ->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
        $this->addArgument('path', InputArgument::REQUIRED, 'Configuration Path');
26
        $this->addArgument('context', InputArgument::OPTIONAL, 'Configuration Context', Config::CONTEXT_DEFAULT);
27
    }
28
29
    protected function execute(InputInterface $input, OutputInterface $output)
30
    {
31
        $factory = new MagiumConfigurationFactory();
32
        $factory->getBuilder();
33
    }
34
35
}
36