ValidationException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 5
c 2
b 0
f 0
dl 0
loc 14
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getViolations() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the CwdPowerDNS Client
5
 *
6
 * (c) 2018 cwd.at GmbH <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Cwd\PowerDNSClient\Validator;
15
16
use Symfony\Component\Validator\ConstraintViolationList;
17
use Symfony\Component\Validator\ConstraintViolationListInterface;
18
19
class ValidationException extends \DomainException
20
{
21
    /** @var ConstraintViolationList */
22
    protected $violations;
23
24
    public function __construct($message, $code = 0, $previous = null, ConstraintViolationListInterface $violations)
25
    {
26
        parent::__construct($message, $code, $previous);
27
        $this->violations = $violations;
28
    }
29
30
    public function getViolations()
31
    {
32
        return $this->violations;
33
    }
34
}
35