Passed
Push — main ( cb939a...76365b )
by Stéphane
50s queued 12s
created

InvalidOpenApiDefinitionException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace CHStudio\Raven\Bridge\LeagueOpenAPIValidation\Exception;
4
5
use InvalidArgumentException;
6
use Throwable;
7
8
class InvalidOpenApiDefinitionException extends InvalidArgumentException
9
{
10 3
    public function __construct(Throwable $previous)
11
    {
12 3
        parent::__construct(sprintf(
13
            "The given OpenApi definition can't be loaded:\n%s -> %s",
14
            $previous::class,
15 3
            $previous->getMessage()
16
        ), 0, $previous);
17
    }
18
}
19