TemplateAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setTemplateDriver() 0 4 1
A getTemplateDriver() 0 4 1
1
<?php
2
3
namespace Ps2alerts\Api\Contract;
4
5
use Twig_Environment as Twig;
6
7
trait TemplateAwareTrait
8
{
9
    /**
10
     * @var \Twig_Environment
11
     */
12
    protected $twig;
13
14
    /**
15
     * Sets template Driver
16
     */
17
    public function setTemplateDriver(Twig $twig)
18
    {
19
        $this->twig = $twig;
20
    }
21
22
    /**
23
     * Gets the template driver
24
     */
25
    public function getTemplateDriver()
26
    {
27
        return $this->twig;
28
    }
29
}
30