Passed
Push — master ( 0f9932...7bc3f9 )
by Brent
03:42
created

function.js.php ➔ smarty_function_js()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 1
dl 0
loc 9
rs 9.6666
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::js()
11
 */
12
function smarty_function_js($params) {
13
    $plugin = Config::getDependency('engine.plugin');
14
15
    $src = isset($params['src']) ? $params['src'] : null;
16
    $inline = isset($params['inline']);
17
    $async = isset($params['async']);
18
19
    return $plugin->js($src, $inline, $async);
20
}
21