Completed
Push — master ( 0f768c...ed861e )
by Eduardo Gulias
02:07
created

MultipleErrors::getErrors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Egulias\EmailValidator\Validation;
4
5
use Egulias\EmailValidator\Exception\InvalidEmail;
6
7
class MultipleErrors extends InvalidEmail
8
{
9
    const CODE = 999;
10
    const REASON = "Accumulated errors for multiple validations";
11
    /**
12
     * @var array
13
     */
14
    private $errors = [];
15
    
16
    public function __construct(array $errors)
17
    {
18
        $this->errors = $errors;
19
        parent::__construct();
20
    }
21
    
22
    public function getErrors()
23
    {
24
        return $this->errors;
25
    }
26
}
27