Completed
Push — master ( 4bb4eb...402013 )
by Arthur
03:35
created

StringHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A camelize() 0 4 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