ConfigProvider::getTemplates()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
3
namespace InFw\Pug;
4
5
use Pug\Pug;
6
7
class ConfigProvider
8
{
9 2
    public function __invoke()
10
    {
11
        return [
12 2
            'dependencies' => $this->getDependencies(),
13 2
            'templates' => $this->getTemplates(),
14 2
            'pug' => $this->getPugConfig(),
15
        ];
16
    }
17
18 2
    protected function getDependencies()
19
    {
20
        return [
21 2
            'factories' => [
22
                Pug::class => PugFactory::class,
23
            ]
24
        ];
25
    }
26
27 2
    protected function getTemplates()
28
    {
29
        return [
30 2
            'extension' => 'pug',
31
        ];
32
    }
33
34 2
    protected function getPugConfig()
35
    {
36
        return [
37 2
            'pretty' => true,
38
            'expressionLanguage' => 'js',
39
            'pugjs' => false,
40
            'localsJsonFile' => false,
41
            'cache' => 'data/cache/pug',
42
            'template_path' => 'templates/',
43
            'globals' => [],
44
            'filters' => [],
45
            'keywords' => [],
46
            'helpers' => [],
47
            'default_params' => [],
48
        ];
49
    }
50
}
51