ValidationException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrors() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace GloBee\PaymentApi\Exceptions\Validation;
4
5
class ValidationException extends \InvalidArgumentException
6
{
7
    /**
8
     * @var array
9
     */
10
    private $errors;
11
12
    /**
13
     * ValidationException constructor.
14
     *
15
     * @param array  $errors
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
16
     * @param string $message
0 ignored issues
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
17
     */
18 16
    public function __construct(array $errors, $message = 'Validation Failed')
0 ignored issues
show
Coding Style introduced by
Type hint "string" missing for $message
Loading history...
19
    {
20 16
        parent::__construct($message);
21 16
        $this->errors = $errors;
22 16
    }
23
24
    /**
25
     * @return array
26
     */
27 1
    public function getErrors()
28
    {
29 1
        return $this->errors;
30
    }
31
}
32