PugRendererFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 16 1
1
<?php
2
3
namespace InFw\Pug;
4
5
use Psr\Container\ContainerInterface;
6
use Pug\Pug;
7
8
class PugRendererFactory
9
{
10 1
    public function __invoke(ContainerInterface $container)
11
    {
12 1
        $config = $container->get('config');
13
14 1
        return new PugTemplateRenderer(
15 1
            $container->get(Pug::class),
16 1
            $config['pug']['default_params'],
17 1
            $config['pug']['globals'],
18 1
            array_merge(
19 1
                $config['templates'],
20
                [
21 1
                    'template_path' => $config['pug']['template_path']
22
                ]
23
            )
24
        );
25
    }
26
}
27