Test Failed
Pull Request — 5.0 (#11)
by
unknown
01:51
created

SwiftTwigMailTemplate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 26
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTemplate() 0 4 1
1
<?php
2
3
namespace TheCodingMachine\Mail\Template;
4
5
class SwiftTwigMailTemplate extends AbstractSwiftTwigMailTemplate
6
{
7
    /**
8
     * @var string
9
     */
10
    private $twigPath;
11
12
    /**
13
     * SwiftTwigMailTemplate constructor.
14
     * @param \Twig_Environment $twig_Environment
15
     * @param string $twigPath
16
     */
17
    public function __construct(\Twig_Environment $twig_Environment, string $twigPath)
18
    {
19
        parent::__construct($twig_Environment);
20
        $this->twigPath = $twigPath;
21
    }
22
23
    /**
24
     * @return \Twig_Template|\Twig_TemplateInterface
25
     */
26
    public function getTemplate()
27
    {
28
        return $this->twigEnvironment->loadTemplate($this->twigPath);
29
    }
30
}