Camelizer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A camelize() 0 6 1
1
<?php
2
3
/**
4
 * Camelizer.php
5
 *
6
 * @author Dominik Kocuj
7
 * @license https://opensource.org/licenses/MIT The MIT License
8
 * @copyright Copyright (c) 2017-2018 kocuj.pl
9
 */
10
11
namespace Kocuj\Di\Tools\Camelizer;
12
13
use Stringy\Stringy;
14
15
/**
16
 * Camelizer
17
 *
18
 * @package Kocuj\Di\Tools\Camelizer
19
 */
20
class Camelizer implements CamelizerInterface
21
{
22
    /**
23
     * Camelize string
24
     *
25
     * @param string $text Text to camelize
26
     * @return string Camelized text
27
     * @see \Kocuj\Di\Tools\Camelizer\CamelizerInterface::camelize()
28
     * @codeCoverageIgnore
29
     */
30
    public function camelize(string $text): string
31
    {
32
        // initialize library
33
        $stringy = new Stringy($text);
34
        // exit
35
        return $stringy->camelize();
36
    }
37
}
38