Completed
Push — master ( cc7b64...53b465 )
by Nicolas
11s
created

helpers.php ➔ public_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('public_path')) {
13
    /**
14
     * Get the path to the public folder.
15
     *
16
     * @param  string  $path
17
     * @return string
18
     */
19
    function public_path($path = '')
20
    {
21
        return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);
22
    }
23
}
24