Completed
Push — master ( 6d5f5d...53a02c )
by Nicolas
12s
created

helpers.php ➔ config_path()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 1
dl 0
loc 4
ccs 0
cts 1
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
if (! function_exists('module_path')) {
4
    function module_path($name)
5
    {
6 1
        $module = app('modules')->find($name);
7
8 1
        return $module->getPath();
9
    }
10
}
11
12
if (! function_exists('config_path')) {
13
    /**
14
     * Get the configuration path.
15
     *
16
     * @param  string $path
17
     * @return string
18
     */
19
    function config_path($path = '')
20
    {
21
        return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
22
    }
23
}
24
25
if (! function_exists('public_path')) {
26
    /**
27
     * Get the path to the public folder.
28
     *
29
     * @param  string  $path
30
     * @return string
31
     */
32
    function public_path($path = '')
33
    {
34
        return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);
35
    }
36
}
37