Passed
Pull Request — master (#222)
by Rustam
02:32
created

RuleHandlerNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 10
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Validator\Exception;
6
7
use RuntimeException;
8
use Throwable;
9
10
final class RuleHandlerNotFoundException extends RuntimeException
11
{
12
    public function __construct(string $name, ?Throwable $previous = null)
13
    {
14
        parent::__construct(
15
            sprintf(
16
                'Handler was not found for "%s" rule or unresolved "%s" class.',
17
                $name,
18
                $name
19
            ),
20
            0,
21
            $previous
22
        );
23
    }
24
}
25