PreDispatchTaskEvent::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
6
use Deployee\Plugins\Deploy\Definitions\Tasks\TaskDefinitionInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
class PreDispatchTaskEvent extends Event
10
{
11
    /**
12
     * @var TaskDefinitionInterface
13
     */
14
    private $task;
15
16
    /**
17
     * @var bool
18
     */
19
    private $preventDispatch;
20
21
    /**
22
     * PreDispatchTaskEvent constructor.
23
     * @param TaskDefinitionInterface $task
24
     */
25
    public function __construct(TaskDefinitionInterface $task)
26
    {
27
        $this->task = $task;
28
        $this->preventDispatch = false;
29
    }
30
31
    /**
32
     * @return TaskDefinitionInterface
33
     */
34
    public function getTask(): TaskDefinitionInterface
35
    {
36
        return $this->task;
37
    }
38
39
    /**
40
     * @return bool
41
     */
42
    public function isPreventDispatch(): bool
43
    {
44
        return $this->preventDispatch;
45
    }
46
47
    /**
48
     * @param bool $preventDispatch
49
     */
50
    public function setPreventDispatch(bool $preventDispatch)
51
    {
52
        $this->preventDispatch = $preventDispatch;
53
    }
54
}