CommandList::addCommands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 11
cts 11
cp 1
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Magium\Configuration\Console\Symfony;
4
5
use Magium\Configuration\Console\Command\ConfigurationBuild;
6
use Magium\Configuration\Console\Command\ConfigurationGet;
7
use Magium\Configuration\Console\Command\ConfigurationList;
8
use Magium\Configuration\Console\Command\ConfigurationListKeys;
9
use Magium\Configuration\Console\Command\ConfigurationSet;
10
use Magium\Configuration\Console\Command\ContextList;
11
use Magium\Configuration\Console\Command\CreateTable;
12
use Magium\Configuration\Console\Command\DefaultCommand;
13
use Symfony\Component\Console\Application;
14
15
class CommandList
16
{
17
18 1
    public function addCommands(Application $application)
19
    {
20 1
        $default = new DefaultCommand(null, true);
21 1
        $application->add($default);
22 1
        $application->add(new ConfigurationBuild(null, true));
23 1
        $application->add(new ConfigurationGet(null, true));
24 1
        $application->add(new ConfigurationSet(null, true));
25 1
        $application->add(new ConfigurationListKeys(null, true));
26 1
        $application->add(new ContextList(null, true));
27 1
        $application->add(new CreateTable(null, true));
28 1
        $application->setDefaultCommand($default->getName());
29 1
    }
30
31
}
32