Completed
Push — master ( 406e4d...460f55 )
by Kirill
12s
created

helpers.php ➔ asset_ts()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
eloc 6
nc 2
nop 2
dl 0
loc 11
rs 9.4285
1
<?php
2
// Asset with timestamp
3
if (!function_exists('asset_ts')) {
4
    function asset_ts($path, $secure = false)
0 ignored issues
show
Unused Code introduced by
The parameter $secure is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
5
    {
6
        $url = '/' . $path;
7
8
        if (is_file(public_path($path))) {
9
            $time = filemtime(public_path($path));
10
            $url .= '?' . $time;
11
        }
12
13
        return $url;
14
    }
15
}