UriResolver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A concat() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Distribution\Resolver;
6
7
use Spiral\Distribution\UriResolverInterface;
8
9
abstract class UriResolver implements UriResolverInterface
10
{
11
    protected function concat(string $file, ?string $prefix): string
12
    {
13
        if ($prefix === null) {
14
            return $file;
15
        }
16
17
        return \trim($prefix, '/') . '/' . \trim($file, '/');
18
    }
19
}
20