ManagerApplication   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 22
rs 10
c 0
b 0
f 0
ccs 0
cts 13
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
namespace JobQueue\Application\Console;
4
5
use JobQueue\Domain\Task\Queue;
6
use Symfony\Component\Console\Application;
7
use Symfony\Component\Console\Command\ListCommand;
8
9
final class ManagerApplication extends Application
10
{
11
    /**
12
     *
13
     * @param Queue $queue
14
     */
15
    public function __construct(Queue $queue)
16
    {
17
        parent::__construct('manager', 1.0);
18
19
        $manCommand = new ListCommand;
20
        $manCommand->setName('man');
21
22
        $this->add($manCommand);
23
        $this->add(new ListTasks($queue));
24
        $this->add(new AddTask($queue));
25
        $this->add(new ShowTask($queue));
26
        $this->add(new EditTask($queue));
27
        $this->add(new DeleteTask($queue));
28
        $this->add(new RestoreTasks($queue));
29
        $this->add(new FlushTasks($queue));
30
        $this->setDefaultCommand('man');
31
    }
32
}
33