Passed
Push — master ( bc339d...bdce7b )
by Gabriel
02:03
created

application.php ➔ inflector()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
cc 3
nc 2
nop 0
dl 0
loc 7
ccs 0
cts 1
cp 0
crap 12
rs 10
c 0
b 0
f 0
1
<?php
2
3
if (!function_exists('inflector')) {
4
    /**
5
     * @return Nip\Inflector\Inflector
6
     */
7
    function inflector(): \Nip\Inflector\Inflector
8
    {
9
        if (function_exists('app') && app()->has('inflector')) {
10
            return app('inflector');
11
        }
12
        return \Nip\Inflector\Inflector::instance();
13
    }
14
}
15