Completed
Push — auto-escape ( 46bb2f...7a06cf )
by
unknown
38:05 queued 23:10
created

auto-escape.php ➔ autoEscapeComposer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\Extension\AutoEscape;
4
5
function autoEscapeComposer(callable $escape) {
6
    return function($template) use ($escape) {
7
        return $template->withData(array_map(function($v) use ($escape) {
8
            return EscapedProxy::create($v, $escape);
9
        }, $template->data));
10
    };
11
}
12