UndefinedPropertyException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 3
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
crap 1
1
<?php
2
3
namespace erasys\OpenApi\Exceptions;
4
5
use LogicException;
6
use Throwable;
7
8
class UndefinedPropertyException extends LogicException implements OpenApiException
9
{
10 15
    public function __construct(string $property, int $code = 0, Throwable $previous = null)
11
    {
12 15
        $message = 'The %s property is not defined. Dynamic access is disabled for Open API objects.';
13 15
        parent::__construct(sprintf($message, $property), $code, $previous);
14 15
    }
15
}
16