UnsatisfiableConstraintException::__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 0
Metric Value
cc 1
eloc 2
nc 1
nop 4
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Ctefan\Kiwi\Exception;
5
6
use Ctefan\Kiwi\Constraint;
7
use Throwable;
8
9
class UnsatisfiableConstraintException extends Exception
10
{
11
    /**
12
     * @var Constraint
13
     */
14
    protected $constraint;
15
16
    /**
17
     * UnsatisfiableConstraintException constructor.
18
     *
19
     * @param Constraint $constraint
20
     * @param string $message
21
     * @param int $code
22
     * @param Throwable|null $previous
23
     */
24 9
    public function __construct(Constraint $constraint, string $message = "", int $code = 0, Throwable $previous = null)
25
    {
26 9
        $this->constraint = $constraint;
27 9
        parent::__construct($message, $code, $previous);
28
    }
29
}