TwigCompiler::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Audiens\DoubleclickClient\service;
4
5
/**
6
 * Class TwigCompiler
7
 */
8
class TwigCompiler
9
{
10
11
    /**
12
 * @var  \Twig_Environment
13
*/
14
    protected $twig;
15
16
17
    /**
18
     * TwigCompiler constructor.
19
     *
20
     * @param string $templatePath
21
     */
22
    public function __construct($templatePath = 'src/templates')
23
    {
24
        $loader = new \Twig_Loader_Filesystem($templatePath);
25
        $this->twig = new \Twig_Environment($loader);
26
    }
27
28
    /**
29
     * @return \Twig_Environment
30
     */
31
    public function getTwig()
32
    {
33
        return $this->twig;
34
    }
35
}
36