Context::setIgnoreMissing()   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 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
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
     * @SuppressWarnings(PHPMD.BooleanArgumentFlag)
21
     */
22 19
    public function __construct($ignoreIllegal = false, $ignoreMissing = false)
23
    {
24 19
        $this->ignoreIllegal = $ignoreIllegal;
25 19
        $this->ignoreMissing = $ignoreMissing;
26 19
    }
27
28
    /**
29
     * @return bool
30
     */
31 1
    public function shouldIgnoreIllegal()
32
    {
33 1
        return $this->ignoreIllegal;
34
    }
35
36
    /**
37
     * @param bool $ignoreIllegal
38
     * @return $this
39
     */
40
    public function setIgnoreIllegal($ignoreIllegal)
41
    {
42
        $this->ignoreIllegal = $ignoreIllegal;
43
        return $this;
44
    }
45
46
    /**
47
     * @return bool
48
     */
49 3
    public function shouldIgnoreMissing()
50
    {
51 3
        return $this->ignoreMissing;
52
    }
53
54
    /**
55
     * @param bool $ignoreMissing
56
     * @return $this
57
     */
58
    public function setIgnoreMissing($ignoreMissing)
59
    {
60
        $this->ignoreMissing = $ignoreMissing;
61
        return $this;
62
    }
63
}
64