DummyTask   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 25
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 4 1
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 DummyTask
9
 * @package Samurai\Task
10
 * @author Raphaël Lefebvre <[email protected]>
11
 */
12
class DummyTask implements ITask
13
{
14
    /**
15
     * @var int|null
16
     */
17
    private $result;
18
19
    /**
20
     * @param int|null $result
21
     */
22 3
    public function __construct($result)
23
    {
24 3
        $this->result = $result;
25 3
    }
26
27
    /**
28
     * @param InputInterface $input
29
     * @param OutputInterface $output
30
     * @return int|null
31
     */
32
    public function execute(InputInterface $input, OutputInterface $output)
33
    {
34
        return $this->result;
35
    }
36
}
37