Completed
Push — master ( 30874d...ed8031 )
by Pablo
02:56
created

PrePushResponse::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 11
nc 1
nop 5
crap 1
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Contract\Response;
4
5
class PrePushResponse
6
{
7
    /**
8
     * @var PhpUnitResponse
9
     */
10
    private $phpUnit;
11
    /**
12
     * @var PhpUnitStrictCoverageResponse
13
     */
14
    private $phpUnitStrictCoverage;
15
    /**
16
     * @var bool
17
     */
18
    private $prePush;
19
    /**
20
     * @var string
21
     */
22
    private $rightMessage;
23
    /**
24
     * @var string
25
     */
26
    private $errorMessage;
27
28
    /**
29
     * PrePushResponse constructor.
30
     *
31
     * @param bool                          $prePush
32
     * @param string                        $rightMessage
33
     * @param string                        $errorMessage
34
     * @param PhpUnitResponse               $phpUnit
35
     * @param PhpUnitStrictCoverageResponse $phpUnitStrictCoverage
36
     */
37 10
    public function __construct(
38
        $prePush,
39
        $rightMessage,
40
        $errorMessage,
41
        PhpUnitResponse $phpUnit,
42
        PhpUnitStrictCoverageResponse $phpUnitStrictCoverage
43
    ) {
44 10
        $this->phpUnit = $phpUnit;
45 10
        $this->phpUnitStrictCoverage = $phpUnitStrictCoverage;
46 10
        $this->prePush = $prePush;
47 10
        $this->rightMessage = $rightMessage;
48 10
        $this->errorMessage = $errorMessage;
49 10
    }
50
51
    /**
52
     * @return PhpUnitResponse
53
     */
54 1
    public function getPhpUnit()
55
    {
56 1
        return $this->phpUnit;
57
    }
58
59
    /**
60
     * @return PhpUnitStrictCoverageResponse
61
     */
62 1
    public function getPhpUnitStrictCoverage()
63
    {
64 1
        return $this->phpUnitStrictCoverage;
65
    }
66
67
    /**
68
     * @return bool
69
     */
70 3
    public function isPrePush()
71
    {
72 3
        return $this->prePush;
73
    }
74
75
    /**
76
     * @return string
77
     */
78 1
    public function getRightMessage()
79
    {
80 1
        return $this->rightMessage;
81
    }
82
83
    /**
84
     * @return string
85
     */
86 2
    public function getErrorMessage()
87
    {
88 2
        return $this->errorMessage;
89
    }
90
}
91