AbstractRules   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 47
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCompiler() 0 3 1
A setCompiledPath() 0 5 1
A setCompiler() 0 5 1
A setTemplatePath() 0 5 1
1
<?php
2
3
namespace Tleckie\Template\Compiler\Parser;
4
5
use Tleckie\Template\Compiler\CompilerInterface;
6
use Tleckie\Template\Compiler\PathInterface;
7
8
/**
9
 * Class AbstractRules
10
 *
11
 * @package Tleckie\Template\Compiler\Parser
12
 * @author  Teodoro Leckie Westberg <[email protected]>
13
 */
14
abstract class AbstractRules implements RulesInterface
15
{
16
    /** @var PathInterface */
17
    protected PathInterface $templatePath;
18
19
    /** @var PathInterface */
20
    protected PathInterface $compiledPath;
21
22
    /** @var CompilerInterface */
23
    protected CompilerInterface $compiler;
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function getCompiler(): CompilerInterface
29
    {
30
        return $this->compiler;
31
    }
32
33
    /**
34
     * @inheritdoc
35
     */
36
    public function setCompiler(CompilerInterface $compiler): RulesInterface
37
    {
38
        $this->compiler = $compiler;
39
40
        return $this;
41
    }
42
43
    /**
44
     * @inheritdoc
45
     */
46
    public function setTemplatePath(PathInterface $templatePath): RulesInterface
47
    {
48
        $this->templatePath = $templatePath;
49
50
        return $this;
51
    }
52
53
    /**
54
     * @inheritdoc
55
     */
56
    public function setCompiledPath(PathInterface $compiledPath): RulesInterface
57
    {
58
        $this->compiledPath = $compiledPath;
59
60
        return $this;
61
    }
62
}
63