Completed
Push — master ( 0a9273...806a7c )
by Rafał
8s
created

ThemeLoader   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A load() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the takeit/AmpHtmlBundle package.
5
 *
6
 * (c) Rafał Muszyński <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Takeit\Bundle\AmpHtmlBundle\Loader;
13
14
final class ThemeLoader implements ThemeLoaderInterface
15
{
16
    /**
17
     * @var \Twig_Loader_Filesystem
18
     */
19
    private $filesystem;
20
21
    /**
22
     * @var string
23
     */
24
    private $themePath;
25
26
    /**
27
     * @param \Twig_Loader_Filesystem $filesystem
28
     * @param $themePath
29
     */
30
    public function __construct(\Twig_Loader_Filesystem $filesystem, $themePath)
31
    {
32
        $this->filesystem = $filesystem;
33
        $this->themePath = $themePath;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    public function load()
40
    {
41
        $this->filesystem->addPath($this->themePath, ThemeLoaderInterface::THEME_NAMESPACE);
42
    }
43
}
44