Planner   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 11 3
1
<?php
2
namespace Samurai\Task;
3
4
use Symfony\Component\Console\Input\InputInterface;
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
/**
8
 * Class Application
9
 * @package Samurai
10
 * @author Raphaël Lefebvre <[email protected]>
11
 */
12
class Planner extends \ArrayObject implements ITask
13
{
14
    /**
15
     * @param InputInterface $input
16
     * @param OutputInterface $output
17
     * @return bool
18
     */
19 9
    public function execute(InputInterface $input, OutputInterface $output)
20
    {
21 9
        $result = 0;
22 9
        foreach($this as $task){
23 8
            $result |= $task->execute($input, $output);
24 8
            if($result & ITask::BLOCKING_ERROR_CODE){
25 1
                return $result;
26
            }
27 9
        }
28 8
        return $result;
29
    }
30
}
31