Completed
Push — develop ( 3c50bf...126c89 )
by Stan
02:00
created

public_path()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
use Illuminate\Container\Container;
4
5
if (!function_exists('public_path')) {
6
    /**
7
     * Get the path to the public folder.
8
     *
9
     * @param  string $path
10
     *
11
     * @return string
12
     */
13
    function public_path($path = '')
14
    {
15
        $destination = ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);
16
17
        return Container::getInstance()
18
                        ->make('path.public') . $destination;
19
    }
20
}
21