Completed
Pull Request — 2.x (#29)
by Akihito
01:35
created

AppPathProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 10 1
1
<?php
2
/**
3
 * This file is part of the Madapaja.TwigModule package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace Madapaja\TwigModule;
8
9
use BEAR\AppMeta\AbstractAppMeta;
10
use Ray\Di\ProviderInterface;
11
12
class AppPathProvider implements ProviderInterface
13
{
14
    /**
15
     * @var AbstractAppMeta
16
     */
17
    private $appMeta;
18
19
    public function __construct(AbstractAppMeta $appMeta)
20
    {
21
        $this->appMeta = $appMeta;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function get()
28
    {
29
        $appDir = $this->appMeta->appDir;
30
        $paths = [
31
            $appDir . '/src/Resource',
32
            $appDir . '/var/templates'
33
        ];
34
35
        return $paths;
36
    }
37
}
38