ValidationFailureException   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 58
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setSubject() 0 3 1
A setFailures() 0 3 1
A getSubject() 0 3 1
A getFailures() 0 3 1
1
<?php
2
3
namespace Mbright\Validation\Exception;
4
5
use Mbright\Validation\Failure\FailureCollection;
6
7
class ValidationFailureException extends \Exception
8
{
9
    /**
10
     * Failures from the filter.
11
     *
12
     * @var FailureCollection
13
     */
14
    protected $failures;
15
16
    /**
17
     * The subject being filtered.
18
     *
19
     * @var mixed
20
     */
21
    protected $subject;
22
23
    /**
24
     * Sets the failures from the filter.
25
     *
26
     * @param FailureCollection $failures The filter failures.
27
     *
28
     * @return null
29
     */
30
    public function setFailures(FailureCollection $failures): void
31
    {
32
        $this->failures = $failures;
33
    }
34
35
    /**
36
     * Gets the failures from the filter.
37
     *
38
     * @return FailureCollection
39
     */
40
    public function getFailures(): FailureCollection
41
    {
42
        return $this->failures;
43
    }
44
45
    /**
46
     * Sets the subject of the filter.
47
     *
48
     * @param mixed $subject The subject being filtered.
49
     *
50
     * @return null
51
     */
52
    public function setSubject($subject): void
53
    {
54
        $this->subject = $subject;
55
    }
56
57
    /**
58
     * Gets the subject of the filter.
59
     *
60
     * @return mixed
61
     */
62
    public function getSubject()
63
    {
64
        return $this->subject;
65
    }
66
}
67