Completed
Push — master ( d41a26...1c5167 )
by Gabriel
04:02
created

asset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 1
ccs 0
cts 1
cp 0
crap 2
1
<?php
2
3
if (!function_exists('asset')) {
4
    /**
5
     * Generate an asset path for the application.
6
     *
7
     * @param  string $path
8
     * @param  bool $secure
9
     * @return string
10
     */
11
    function asset($path, $secure = null)
12
    {
13
        return app('url')->asset($path, $secure);
0 ignored issues
show
Bug introduced by
The function app was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

13
        return /** @scrutinizer ignore-call */ app('url')->asset($path, $secure);
Loading history...
14
    }
15
}
16