Completed
Push — master ( 7e35c8...2644e5 )
by Arjay
02:50
created

fallback.php ➔ public_path()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 1
eloc 2
c 1
b 1
f 1
nc 1
nop 1
dl 0
loc 4
rs 10
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