TwigCompiler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTwig() 0 4 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