Completed
Push — master ( f5d602...24c80e )
by WEBEWEB
01:41
created

TwigEnvironmentTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTwigEnvironment() 0 3 1
A setTwigEnvironment() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Service;
13
14
use Twig_Environment;
15
16
/**
17
 * Twig environment trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\CoreBundle\Service
21
 */
22
trait TwigEnvironmentTrait {
23
24
    /**
25
     * Twig environment.
26
     *
27
     * @var Twig_Environment
28
     */
29
    private $twigEnvironment;
30
31
    /**
32
     * Get the Twig environment.
33
     *
34
     * @return Twig_Environment Returns the Twig environment.
35
     */
36
    public function getTwigEnvironment() {
37
        return $this->twigEnvironment;
38
    }
39
40
    /**
41
     * Set the Twig environment.
42
     *
43
     * @param Twig_Environment $twigEnvironment The Twig environment.
44
     */
45
    protected function setTwigEnvironment(Twig_Environment $twigEnvironment) {
46
        $this->twigEnvironment = $twigEnvironment;
47
        return $this;
48
    }
49
50
}
51