Completed
Push — master ( 8e5216...cac524 )
by Nikola
10s
created

Build   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 6 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Version\Extension;
6
7
use Version\Exception\InvalidIdentifierException;
8
9
class Build extends BaseExtension
10
{
11 18
    protected function validate(string $identifier) : void
12
    {
13 18
        if (! preg_match('/^[0-9A-Za-z\-]+$/', $identifier)) {
14 1
            throw InvalidIdentifierException::forExtensionIdentifier($this, $identifier);
15
        }
16 17
    }
17
}
18