PostDispatchTaskEvent::getTask()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Deployee\Plugins\Deploy\Events;
4
5
use Deployee\Plugins\Deploy\Definitions\Tasks\TaskDefinitionInterface;
6
use Deployee\Plugins\Deploy\Dispatcher\DispatchResultInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
class PostDispatchTaskEvent extends Event
10
{
11
    /**
12
     * @var TaskDefinitionInterface
13
     */
14
    private $task;
15
16
    /**
17
     * @var DispatchResultInterface
18
     */
19
    private $result;
20
21
    /**
22
     * PostDispatchTaskEvent constructor.
23
     * @param TaskDefinitionInterface $task
24
     * @param DispatchResultInterface $result
25
     */
26
    public function __construct(TaskDefinitionInterface $task, DispatchResultInterface $result)
27
    {
28
        $this->task = $task;
29
        $this->result = $result;
30
    }
31
32
    /**
33
     * @return TaskDefinitionInterface
34
     */
35
    public function getTask(): TaskDefinitionInterface
36
    {
37
        return $this->task;
38
    }
39
40
    /**
41
     * @return DispatchResultInterface
42
     */
43
    public function getResult(): DispatchResultInterface
44
    {
45
        return $this->result;
46
    }
47
}