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

Format::camelCase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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