Completed
Pull Request — master (#2)
by Samuel
04:21
created

MutationException::getConstraintViolations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Common\Domain;
4
5
use Symfony\Component\Validator\ConstraintViolationListInterface;
6
7
class MutationException extends \RuntimeException
8
{
9
    /**
10
     * @var ConstraintViolationListInterface
11
     */
12
    private $constraintViolations;
13
14
    /**
15
     * @param ConstraintViolationListInterface $constraintViolations
16
     * @param string $message
17
     * @param int $code
18
     * @param \Exception|null $previous
19
     */
20
    public function __construct(ConstraintViolationListInterface $constraintViolations, $message = '', $code = 0, \Exception $previous = null)
21
    {
22
        $this->constraintViolations = $constraintViolations;
23
24
        parent::__construct($message, $code, $previous);
25
    }
26
27
    /**
28
     * @return ConstraintViolationListInterface
29
     */
30
    public function getConstraintViolations(): ConstraintViolationListInterface
31
    {
32
        return $this->constraintViolations;
33
    }
34
}
35