Completed
Pull Request — 1.x (#19)
by IWASAKI
04:35 queued 02:12
created

TwigEnvironmentProvider::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Madapaja\TwigModule;
4
5
use Ray\Di\Di\Named;
6
use Ray\Di\ProviderInterface;
7
use Twig_Environment;
8
9
class TwigEnvironmentProvider implements ProviderInterface
10
{
11
    private $twig;
12
13
    /**
14
     * @Named("original")
15
     * @param Twig_Environment $twig
16
     */
17 20
    public function __construct(Twig_Environment $twig)
18
    {
19 20
        $this->twig = $twig;
20 20
    }
21
22
    /**
23
     * @return Twig_Environment
24
     */
25 20
    public function get()
26
    {
27 20
        return $this->twig;
28
    }
29
}
30