Passed
Push — master ( afd02d...b0430a )
by Allan
03:37 queued 10s
created

PathUtils::composePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
1
<?php
2
/**
3
 * Copyright © Vaimo Group. All rights reserved.
4
 * See LICENSE_VAIMO.txt for license details.
5
 */
6
namespace Vaimo\ComposerPatches\Utils;
7
8
class PathUtils
9
{
10
    public function composePath()
11
    {
12
        $pathSegments = array_map(function ($item) {
13
            return rtrim($item, DIRECTORY_SEPARATOR);
14
        }, func_get_args());
15
16
        return implode(
17
            DIRECTORY_SEPARATOR,
18
            array_filter($pathSegments)
19
        );
20
    }
21
}
22