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

TwigEnvironmentProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 4 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