Completed
Push — master ( 3a75c3...4b4c57 )
by Rafael
04:18
created

UnderscoreNamingStrategy   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transformName() 0 4 1
1
<?php
2
3
/**
4
 * LICENSE: This file is subject to the terms and conditions defined in
5
 * file 'LICENSE', which is part of this source code package.
6
 *
7
 * @copyright 2016 Copyright(c) - All rights reserved.
8
 */
9
10
namespace Rafrsr\LibArray2Object\Naming;
11
12
use Doctrine\Common\Inflector\Inflector;
13
14
/**
15
 * Transform property name from "propertyName" -> "property_name"
16
 */
17
class UnderscoreNamingStrategy implements NamingStrategyInterface
18
{
19
    /**
20
     * @inheritDoc
21
     */
22
    public function transformName($name)
23
    {
24
        return Inflector::tableize($name);
25
    }
26
}