ConfigProvider::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
ccs 0
cts 2
cp 0
crap 2
rs 10
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