Passed
Push — develop ( 0d7fb1...8577d6 )
by Alejandro
09:01 queued 01:01
created

SimpleShortUrlRelationResolver   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 3
dl 0
loc 10
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A resolveApiKey() 0 3 1
A resolveDomain() 0 3 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Shlinkio\Shlink\Core\ShortUrl\Resolver;
6
7
use Shlinkio\Shlink\Core\Entity\Domain;
8
use Shlinkio\Shlink\Rest\Entity\ApiKey;
9
10
class SimpleShortUrlRelationResolver implements ShortUrlRelationResolverInterface
11
{
12
    public function resolveDomain(?string $domain): ?Domain
13
    {
14
        return $domain !== null ? new Domain($domain) : null;
15
    }
16
17
    public function resolveApiKey(?string $key): ?ApiKey
18
    {
19
        return null;
20
    }
21
}
22