ConfigProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 23
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
A getDependencies() 0 6 1
1
<?php
2
3
namespace Antidot\Render\Phug\Container\Config;
4
5
use Antidot\Render\Phug\Container\PugFactory;
6
use Antidot\Render\Phug\Container\PugRendererFactory;
7
use Antidot\Render\TemplateRenderer;
8
use Pug\Pug;
9
10
class ConfigProvider
11
{
12
    /**
13
     * @return array<mixed>
14
     */
15
    public function __invoke(): array
16
    {
17
        return [
18
            'dependencies' => $this->getDependencies(),
19
            'templates' => PugConfig::DEFAULT_TEMPLATE_CONFIG,
20
            'pug' => PugConfig::DEFAULT_PUG_CONFIG,
21
        ];
22
    }
23
24
    /**
25
     * @return array<array<string, string>>
26
     */
27
    protected function getDependencies(): array
28
    {
29
        return [
30
            'factories' => [
31
                Pug::class => PugFactory::class,
32
                TemplateRenderer::class => PugRendererFactory::class,
33
            ]
34
        ];
35
    }
36
}
37