Completed
Pull Request — 1.x (#19)
by IWASAKI
09:16 queued 05:43
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
     */
16 20
    public function __construct(Twig_Environment $twig)
17
    {
18 20
        $this->twig = $twig;
19 20
    }
20
21
    /**
22
     * @return Twig_Environment
23
     */
24 20
    public function get()
25
    {
26 20
        return $this->twig;
27
    }
28
}
29