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