Completed
Push — master ( 79e89c...34165e )
by Nikola
01:13
created

InvalidVersion::negativeNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Version\Exception;
6
7
use DomainException;
8
9
class InvalidVersion extends DomainException implements VersionException
10
{
11 3
    public static function negativeNumber(string $part, int $value): self
12
    {
13 3
        return new self(sprintf(
14 3
            '%s version must be positive integer, %s given',
15 3
            ucfirst($part),
16 3
            $value
17
        ));
18
    }
19
}
20