Completed
Push — 186-data ( 572d68...d14d7f )
by
unknown
10:34
created

PathHydrateTemplate::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace League\Plates\Extension\Path;
4
5
use League\Plates;
6
7
final class PathHydrateTemplate implements Plates\HydrateTemplate
8
{
9
    private $resolve_path;
10
11
    public function __construct(callable $resolve_path) {
12
        $this->resolve_path = $resolve_path;
13
    }
14
15
    public function hydrateTemplate(Plates\Template $template) {
16
        Plates\Template\setPath($template, ResolvePathArgs::fromTemplate($template, $resolve_path));
0 ignored issues
show
Bug introduced by
The variable $resolve_path does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
17
    }
18
}
19