Completed
Pull Request — master (#431)
by Anton
04:15
created

ValidatorException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 28
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrors() 0 4 1
A setErrors() 0 4 1
1
<?php
2
/**
3
 * Bluz Framework Component
4
 *
5
 * @copyright Bluz PHP Team
6
 * @link      https://github.com/bluzphp/framework
7
 */
8
9
declare(strict_types=1);
10
11
namespace Bluz\Validator\Exception;
12
13
use Bluz\Application\Exception\BadRequestException;
14
15
/**
16
 * Validator Exception
17
 *
18
 * @package  Bluz\Validator\Exception
19
 * @author   Anton Shevchuk
20
 */
21
class ValidatorException extends BadRequestException
22
{
23
    /**
24
     * @var string exception message
25
     */
26
    protected $message = 'Invalid Arguments';
27
28
    /**
29
     * @var array
30
     */
31
    protected $errors;
32
33
    /**
34
     * @return array
35
     */
36 2
    public function getErrors(): array
37
    {
38 2
        return $this->errors;
39
    }
40
41
    /**
42
     * @param array $errors
43
     */
44 3
    public function setErrors(array $errors)
45
    {
46 3
        $this->errors = $errors;
47 3
    }
48
}
49