Completed
Push — master ( d00936...2b9629 )
by Sebastian
03:18 queued 01:30
created

Path::merge()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
3
namespace Spatie\Feed\Helpers;
4
5
class Path
6
{
7
    public static function merge(...$paths): string
8
    {
9
        return collect($paths)->map(function (string $path) {
10
            return trim($path, '/');
11
        })->implode('/');
12
    }
13
}
14