Passed
Push — master ( a9ded0...f9a501 )
by thomas
02:55
created

SchemaValidationException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 4
crap 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 5
    public function __construct(
12
        array $errors,
13
        string $message = "",
14
        int $code = 0,
15
        \Throwable $previous = null
16
    ) {
17 5
        $this->errors = $errors;
18 5
        parent::__construct($message, $code, $previous);
19 5
    }
20
21 2
    public function getErrors(): array
22
    {
23 2
        return $this->errors;
24
    }
25
}
26