ConfigProvider   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 44
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
A getDependencies() 0 8 1
A getTemplates() 0 6 1
A getPugConfig() 0 16 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