Completed
Pull Request — master (#286)
by
unknown
02:48
created

ValidationException::getLineNumber()   A

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Ddeboer\DataImport\Exception;
4
5
use Ddeboer\DataImport\Exception;
6
use Symfony\Component\Validator\ConstraintViolationListInterface;
7
8
/**
9
 * @author Markus Bachmann <[email protected]>
10
 */
11
class ValidationException extends \Exception implements Exception
12
{
13
    /**
14
     * @var ConstraintViolationListInterface
15
     */
16
    private $violations;
17
18
    /**
19
     * @var integer
20
     */
21
    private $lineNumber;
22
23
    /**
24
     * @param ConstraintViolationListInterface $list
25
     * @param integer                          $line
26
     */
27 1
    public function __construct(ConstraintViolationListInterface $list, $line)
28
    {
29 1
        $this->violations = $list;
30 1
        $this->lineNumber = $line;
31 1
    }
32
33
    /**
34
     * @return ConstraintViolationListInterface
35
     */
36
    public function getViolations()
37
    {
38
        return $this->violations;
39
    }
40
41
    /**
42
     * @return integer
43
     */
44
    public function getLineNumber()
45
    {
46
        return $this->lineNumber;
47
    }
48
}
49