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

InvalidVersion   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 11
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A negativeNumber() 0 8 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