Helper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 14
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A generateName() 0 6 1
1
<?php
2
3
namespace Bavix\Router;
4
5
class Helper
6
{
7
8
    /**
9
     * @param string $path
10
     *
11
     * @return string
12
     */
13
    public static function generateName(string $path): string
14
    {
15
        return \preg_replace(
16
            '~[^\w-]~',
17
            '_',
18
            $path
19
        );
20
    }
21
22
}
23