Completed
Push — master ( ecefe7...6f77f9 )
by James Ekow Abaka
08:35
created

functions.php ➔ unescape()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 5
nc 2
nop 1
dl 0
loc 8
ccs 0
cts 0
cp 0
crap 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
use ntentan\honam\TemplateEngine;
3
4
function t($template, $templateData = array())
5
{
6
    return TemplateEngine::render($template, $templateData);
7 3
}
8
9
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...
10
{
11
    if($item instanceof ntentan\honam\template_engines\php\Variable) {
12
        return $item->unescape();
13
    } else {
14
        return $item;
15
    }
16
}
17