InigoRenderer::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Kaloa\Renderer;
4
5
use Kaloa\Renderer\Inigo\Parser;
6
7
/**
8
 *
9
 */
10
final class InigoRenderer implements RendererInterface
11
{
12
    /**
13
     * @var Parser
14
     */
15
    private $parser = null;
16
17
    /**
18
     *
19
     * @param Config $config
20
     */
21 17
    public function __construct(Config $config)
22
    {
23 17
        $this->parser = new Parser();
24 17
        $this->parser->addDefaultHandlers($config);
25 17
    }
26
27
    /**
28
     *
29
     * @param  string $input
30
     * @return string
31
     */
32 17
    public function render($input)
33
    {
34 17
        return $this->parser->parse($input);
35
    }
36
}
37