Completed
Pull Request — master (#15)
by Martin
61:47 queued 54:36
created

TwitalFormulaLoader::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
namespace Goetas\TwitalBundle\Assetic;
4
5
use Assetic\Extension\Twig\TwigFormulaLoader;
6
use Assetic\Factory\Resource\ResourceInterface;
7
use Goetas\Twital\TwitalLoader;
8
use Goetas\TwitalBundle\Assetic\Resource\TwitalResource;
9
10
/**
11
 *
12
 * @author Asmir Mustafic <[email protected]>
13
 *
14
 */
15
class TwitalFormulaLoader extends TwigFormulaLoader
16
{
17
18
    private $twital;
19
20
    public function __construct(TwitalLoader $twital, \Twig_Environment $twig)
21
    {
22
        $this->twital = $twital;
23
        parent::__construct($twig);
24
    }
25
26
    public function load(ResourceInterface $resource)
27
    {
28
        return parent::load(new TwitalResource($this->twital, $resource));
29
    }
30
}
31