UrlHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A namespaceToParam() 0 3 1
A paramToNamespace() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
namespace DH\DoctrineAuditBundle\Helper;
4
5
final class UrlHelper
6
{
7
    private function __construct()
8
    {
9
    }
10
11
    public static function paramToNamespace(string $entity): string
12
    {
13
        return str_replace('-', '\\', $entity);
14
    }
15
16
    public static function namespaceToParam(string $entity): string
17
    {
18
        return str_replace('\\', '-', $entity);
19
    }
20
}
21