Completed
Push — master ( 7a843b...5194d5 )
by Yuri
04:32
created

functions.php ➔ str_name_case()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
ccs 1
cts 1
cp 1
crap 1
rs 10
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 6
        return Formatter::nameCase($string, $options);
18
    }
19
}
20