Passed
Push — feature/active-node ( 87efcf...5b1cae )
by Fike
03:18
created

Context   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 57.14%

Importance

Changes 0
Metric Value
dl 0
loc 55
ccs 8
cts 14
cp 0.5714
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setIgnoreMissing() 0 4 1
A shouldIgnoreIllegal() 0 3 1
A __construct() 0 4 1
A setIgnoreIllegal() 0 4 1
A shouldIgnoreMissing() 0 3 1
1
<?php
2
3
namespace AmaTeam\TreeAccess\Locator;
4
5
class Context
6
{
7
    /**
8
     * @var bool
9
     */
10
    private $ignoreIllegal = false;
11
    /**
12
     * @var bool
13
     */
14
    private $ignoreMissing = false;
15
16
    /**
17
     * @param bool $ignoreIllegal
18
     * @param bool $ignoreMissing
19
     */
20 17
    public function __construct($ignoreIllegal = false, $ignoreMissing = false)
21
    {
22 17
        $this->ignoreIllegal = $ignoreIllegal;
23 17
        $this->ignoreMissing = $ignoreMissing;
24 17
    }
25
26
    /**
27
     * @return bool
28
     */
29 1
    public function shouldIgnoreIllegal()
30
    {
31 1
        return $this->ignoreIllegal;
32
    }
33
34
    /**
35
     * @param bool $ignoreIllegal
36
     * @return $this
37
     */
38
    public function setIgnoreIllegal($ignoreIllegal)
39
    {
40
        $this->ignoreIllegal = $ignoreIllegal;
41
        return $this;
42
    }
43
44
    /**
45
     * @return bool
46
     */
47 3
    public function shouldIgnoreMissing()
48
    {
49 3
        return $this->ignoreMissing;
50
    }
51
52
    /**
53
     * @param bool $ignoreMissing
54
     * @return $this
55
     */
56
    public function setIgnoreMissing($ignoreMissing)
57
    {
58
        $this->ignoreMissing = $ignoreMissing;
59
        return $this;
60
    }
61
}
62