Completed
Pull Request — master (#13)
by Nikola
01:52
created

InvalidCompositeConstraintException::forConstraint()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
cc 2
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Version\Exception;
6
7
use DomainException;
8
9
/**
10
 * @author Nikola Posa <[email protected]>
11
 */
12
class InvalidCompositeConstraintException extends DomainException implements ExceptionInterface
13
{
14 1
    public static function forType(string $type) : self
15
    {
16 1
        return new self(sprintf('Unsupported type: %s', $type));
17
    }
18
}
19