Test Failed
Push — master ( 453945...60d866 )
by Florian
02:33
created

Utility   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A sanitizePath() 0 7 2
1
<?php
2
declare(strict_types = 1);
3
4
namespace Phauthentic\Presentation\Renderer;
5
6
/**
7
 * Utility
8
 */
9
class Utility
10
{
11
    /**
12
     * Sanitizes the template path
13
     *
14
     * @param string $path
15
     * @return string
16
     */
17 3
    public static function sanitizePath(string $path): string
18
    {
19 3
        if (DIRECTORY_SEPARATOR === '\\') {
20
            return str_replace('/', '\\', $path);
21
        }
22
23 3
        return str_replace('\\', '/', $path);
24
    }
25
}
26