str_name_case()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

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