CommitMsgResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Contract\Response;
4
5
class CommitMsgResponse
6
{
7
    /**
8
     * @var bool
9
     */
10
    private $commitMsg;
11
    /**
12
     * @var string
13
     */
14
    private $regularExpression;
15
16
    /**
17
     * CommitMsgResponse constructor.
18
     *
19
     * @param bool   $commitMsg
20
     * @param string $regularExpression
21
     */
22 9
    public function __construct($commitMsg, $regularExpression)
23
    {
24 9
        $this->commitMsg = $commitMsg;
25 9
        $this->regularExpression = $regularExpression;
26 9
    }
27
28
    /**
29
     * @return bool
30
     */
31 3
    public function isCommitMsg()
32
    {
33 3
        return $this->commitMsg;
34
    }
35
36
    /**
37
     * @return string
38
     */
39 1
    public function getRegularExpression()
40
    {
41 1
        return $this->regularExpression;
42
    }
43
}
44