Completed
Push — master ( e5b10a...ef7318 )
by dotzero
02:34 queued 01:01
created

Format   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A camelCase() 0 4 1
1
<?php
2
3
namespace AmoCRM\Helpers;
4
5
/**
6
 * Class Format
7
 *
8
 * Хелпер для изменения формата данных
9
 *
10
 * @package AmoCRM\Helpers
11
 * @author denostr <[email protected]>
12
 * @link https://github.com/dotzero/amocrm-php
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
class Format
18
{
19
    /**
20
     * Приведение under_score к CamelCase
21
     *
22
     * @param string $string Строка
23
     * @return string Строка
24
     */
25 177
    public static function camelCase($string)
26
    {
27 177
        return str_replace(' ', '', ucwords(str_replace('_', ' ', $string)));
28
    }
29
}
30