Completed
Pull Request — 1.x (#19)
by IWASAKI
09:16 queued 05:43
created

TwigEnvironmentProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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
     */
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