Completed
Push — master ( a5fa8e...2d0971 )
by James Ekow Abaka
06:10
created

functions.php ➔ unescape()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 8
rs 9.4285
1
<?php
2
use ntentan\honam\AssetsLoader;
3
use ntentan\honam\TemplateEngine;
4
5
function load_asset($asset, $copyFrom = null)
6
{
7
    return AssetsLoader::load($asset, $copyFrom);
8
}
9
10
function get_asset($asset)
11
{
12
    return AssetsLoader::getAssetPath($asset);
13
}
14
15
function t($template, $templateData = array())
16
{
17
    return TemplateEngine::render($template, $templateData);
18
}
19
20
function unescape($item)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
21
{
22
    if($item instanceof ntentan\honam\template_engines\php\Variable) {
23
        return $item->unescape();
24
    } else {
25
        return $item;
26
    }
27
}
28