Helpers   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A formatColumnName() 0 4 1
A unformatColumnName() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Grido (https://github.com/o5/grido)
5
 *
6
 * Copyright (c) 2011 Petr Bugyík (http://petr.bugyik.cz)
7
 *
8
 * For the full copyright and license information, please view
9
 * the file LICENSE.md that was distributed with this source code.
10
 */
11
12
namespace Grido;
13
14
/**
15
 * Helpers.
16
 *
17
 * @package     Grido
18
 * @author      Josef Kříž <[email protected]>
19
 */
20
class Helpers
21 1
{
22
    /**
23
     * @param string $name
24
     * @return string
25
     */
26
    public static function formatColumnName($name)
27
    {
28 1
        return str_replace('.', '__', $name);
29
    }
30
31
    /**
32
     * @param string $name
33
     * @return string
34
     */
35
    public static function unformatColumnName($name)
36
    {
37 1
        return str_replace('__', '.', $name);
38
    }
39
}
40