Passed
Push — develop ( 119dfd...2d7b42 )
by Brent
02:44
created

function.css.php ➔ smarty_function_css()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
use Brendt\Stitcher\Stitcher;
4
use Brendt\Stitcher\Template\TemplatePlugin;
5
6
/**
7
 * @param $params
8
 *
9
 * @return mixed
10
 *
11
 * @see \Brendt\Stitcher\Template\EnginePlugin::css()
12
 */
13
function smarty_function_css($params) {
14
    /** @var TemplatePlugin $plugin */
15
    $plugin = Stitcher::get('service.template.plugin');
16
17
    $src = isset($params['src']) ? $params['src'] : null;
18
    $inline = isset($params['inline']);
19
20
    return $plugin->css($src, $inline);
21
}
22