DummyTask::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 2
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