Completed
Push — master ( 435ff5...582ba7 )
by Gianluca
16s queued 11s
created

ValidationException::getErrors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProposalPage\Sdk\Exception;
6
7
use Exception;
8
9
final class ValidationException extends Exception
10
{
11
    private $errors = [];
12
13
    public function __construct(array $errors)
14
    {
15
        parent::__construct('The given data failed to pass validation.');
16
17
        $this->errors = $errors;
18
    }
19
20
    public function getErrors()
21
    {
22
        return $this->errors;
23
    }
24
}
25