Test Failed
Push — 5.0 ( aa12f8...5bd2c0 )
by David
40s
created

SwiftTwigMailString::__construct()   A

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