Helpers::unformatColumnName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 1
cts 1
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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