Completed
Push — master ( a81ac8...05e307 )
by Alejandro
25s queued 13s
created

SimpleDomainResolver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolveDomain() 0 3 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Shlinkio\Shlink\Core\Domain\Resolver;
5
6
use Shlinkio\Shlink\Core\Entity\Domain;
7
8
class SimpleDomainResolver implements DomainResolverInterface
9
{
10 45
    public function resolveDomain(?string $domain): ?Domain
11
    {
12 45
        return $domain !== null ? new Domain($domain) : null;
13
    }
14
}
15