TemplateReference::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates;
4
5
/** mutable template reference to allow relationships */
6
final class TemplateReference
7
{
8
    public $template;
9
10 52
    public function __invoke() {
11 52
        return $this->template;
12
    }
13
14 212
    public function update(Template $template) {
15 212
        $this->template = $template;
16 212
        return $this;
17
    }
18
}
19