Data   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A normalize() 0 4 1
1
<?php
2
/*
3
 * This file is part of the php-utilities package.
4
 *
5
 * (c) Marc Aschmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Asm\Data;
11
12
/**
13
 * Class Data
14
 *
15
 * @package Asm\Data
16
 * @author Marc Aschmann <[email protected]>
17
 */
18
class Data implements DataInterface
19
{
20
    use DataTrait;
21
22
    /**
23
     * Normalize a key.
24
     *
25
     * @param  string $key
26
     * @return string
27
     */
28
    public static function normalize($key)
29
    {
30
        return lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $key))));
31
    }
32
}
33