Completed
Push — master ( e98ec0...b5ecb4 )
by Arjay
07:49
created

lumen.php ➔ config_path()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
if (!function_exists('config_path')) {
4
    /**
5
     * Get the configuration path.
6
     *
7
     * @param  string $path
8
     * @return string
9
     */
10
    function config_path($path = '')
11
    {
12
        return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
13
    }
14
}
15
16
if (!function_exists('public_path')) {
17
    /**
18
     * Return the path to public dir
19
     *
20
     * @param null $path
21
     * @return string
22
     */
23
    function public_path($path = null)
24
    {
25
        return rtrim(app()->basePath('public/' . $path), '/');
26
    }
27
}
28