Exception::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

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
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rs\XmlFilter\Exception;
6
7
use Rs\XmlFilter\Document\Element;
8
9
class Exception extends \Exception
10
{
11
    /**
12
     * @var Element
13
     */
14
    private $element;
15
    /**
16
     * @var array
17
     */
18
    private $options;
19
    /**
20
     * @var mixed
21
     */
22
    private $value;
23
24 6
    public function __construct($message, Element $element, array $options, $value = null)
25
    {
26 6
        parent::__construct($message);
27
28 6
        $this->element = $element;
29 6
        $this->options = $options;
30 6
        $this->message = $message;
31 6
        $this->value = $value;
32 6
    }
33
34 1
    public function getOptions() : array
35
    {
36 1
        return $this->options;
37
    }
38
39 2
    public function getElement() : Element
40
    {
41 2
        return $this->element;
42
    }
43
44 1
    public function getValue()
45
    {
46 1
        return $this->value;
47
    }
48
}
49