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

SimpleShortUrlRelationResolver::resolveDomain()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 2
nc 2
nop 1
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