StringHelper::camelize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Arthem\GraphQLMapper\Utils;
4
5
abstract class StringHelper
6
{
7
    /**
8
     * Camelizes a string.
9
     *
10
     * @param string $id A string to camelize
11
     * @return string The camelized string
12
     */
13
    public static function camelize($id)
14
    {
15
        return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']);
16
    }
17
}
18