Exception   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 40
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getOptions() 0 4 1
A getElement() 0 4 1
A getValue() 0 4 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