Test Failed
Push — master ( 74cda5...6f16a3 )
by Brent
03:33
created

function.file.php ➔ smarty_function_file()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
use Brendt\Stitcher\Config;
4
5
/**
6
 * @param $params
7
 *
8
 * @return mixed
9
 *
10
 * @see \Brendt\Stitcher\Template\EnginePlugin::css()
11
 */
12
function smarty_function_file($params) {
13
    $plugin = Config::getDependency('engine.plugin');
14
15
    $src = isset($params['src']) ? $params['src'] : null;
16
17
    return $plugin->file($src);
18
}
19