Completed
Push — master ( c5181d...c8e170 )
by Nikola
01:19
created

Build   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Version\Extension;
6
7
use Version\Assert\VersionAssert;
8
9
class Build extends Extension
10
{
11 18
    protected function validate(string $identifier): void
12
    {
13 18
        VersionAssert::that($identifier)->regex(
14 18
            '/^[0-9A-Za-z\-]+$/',
15 18
            'Build metadata is not valid; identifiers must include only alphanumerics and hyphen'
16
        );
17 17
    }
18
}
19