config_path()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 2
eloc 1
c 1
b 1
f 0
nc 2
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
if (! function_exists('config_path')) {
4
    /**
5
     * Get the configuration path.
6
     *
7
     * This is a polyfill for the missing shorthand function in lumen.
8
     *
9
     * @param  string  $path
10
     * @return string
11
     */
12
    function config_path($path = '')
13
    {
14
        return app()->basePath('config').($path ? DIRECTORY_SEPARATOR.$path : $path);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return /** @scrutinizer ignore-call */ app()->basePath('config').($path ? DIRECTORY_SEPARATOR.$path : $path);
Loading history...
15
    }
16
}
17