Passed
Pull Request — master (#2)
by thomas
02:16
created

SchemaValidationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 17
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrors() 0 3 1
A __construct() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BitWasp\Trezor\Bridge\Exception;
6
7
class SchemaValidationException extends BridgeException
8
{
9
    private $errors = [];
10
11 2
    public function __construct(
12
        array $errors,
13
        string $message = "",
14
        int $code = 0,
15
        \Throwable $previous = null
16
    ) {
17 2
        $this->errors = $errors;
18 2
        parent::__construct($message, $code, $previous);
19 2
    }
20
21
    public function getErrors(): array
22
    {
23
        return $this->errors;
24
    }
25
}
26