StepRegistrationDependency::getDependantId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace PSB\Core\Pipeline;
3
4
5
use PSB\Core\Util\Guard;
6
7
class StepRegistrationDependency
8
{
9
    /**
10
     * @var string
11
     */
12
    private $dependantId;
13
14
    /**
15
     * @var string
16
     */
17
    private $dependsOnId;
18
19
    /**
20
     * @var bool
21
     */
22
    private $isEnforced;
23
24
    /**
25
     * @param string $dependantId
26
     * @param string $dependsOnId
27
     * @param bool   $isEnforced
28
     */
29 15
    public function __construct($dependantId, $dependsOnId, $isEnforced)
30
    {
31 15
        Guard::againstNullAndEmpty('dependantId', $dependantId);
32 14
        Guard::againstNullAndEmpty('dependsOnId', $dependsOnId);
33
34 13
        $this->dependantId = $dependantId;
35 13
        $this->dependsOnId = $dependsOnId;
36 13
        $this->isEnforced = $isEnforced;
37 13
    }
38
39
    /**
40
     * @return string
41
     */
42 3
    public function getDependantId()
43
    {
44 3
        return $this->dependantId;
45
    }
46
47
    /**
48
     * @return string
49
     */
50 8
    public function getDependsOnId()
51
    {
52 8
        return $this->dependsOnId;
53
    }
54
55
    /**
56
     * @return boolean
57
     */
58 5
    public function isEnforced()
59
    {
60 5
        return $this->isEnforced;
61
    }
62
}
63