UriResolver::concat()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
ccs 0
cts 4
cp 0
crap 6
rs 10
c 0
b 0
f 0
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