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

function.meta.php ➔ smarty_function_meta()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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