AppPathProvider::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
crap 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 1
    public function __construct(AbstractAppMeta $appMeta)
20
    {
21 1
        $this->appMeta = $appMeta;
22 1
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27 1
    public function get()
28
    {
29 1
        $appDir = $this->appMeta->appDir;
30
        $paths = [
31 1
            $appDir . '/src/Resource',
32 1
            $appDir . '/var/lib/twig'
33
        ];
34
35 1
        return $paths;
36
    }
37
}
38