Completed
Push — master ( 958ae3...2b12d4 )
by Yuri
11:34
created

function.php ➔ str_name_case()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
use Tamtamchik\NameCase\Formatter;
4
5
if ( ! function_exists('str_name_case')) {
6
7
    /**
8
     * Wrapper for NameCase object to be used as global function.
9
     *
10
     * @param string $string  - string to NameCase.
11
     * @param array  $options - options for NameCase.
12
     *
13
     * @return string
14
     */
15
    function str_name_case($string, $options = [])
16
    {
17
        return Formatter::nameCase($string, $options);
18
    }
19
}
20