ConfigProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
A getDependencies() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Soluble\Wallit\Config;
6
7
use Soluble\Wallit\Middleware\JwtAuthMiddleware;
8
use Soluble\Wallit\Middleware\JwtAuthMiddlewareFactory;
9
use Soluble\Wallit\Service\JwtService;
10
use Soluble\Wallit\Service\JwtServiceFactory;
11
12
class ConfigProvider
13
{
14
    /**
15
     * Configuration key.
16
     *
17
     * @var string
18
     */
19
    public const CONFIG_PREFIX = 'soluble_wallit';
20
21
    /**
22
     * @return array[]
23
     */
24 1
    public function __invoke(): array
25
    {
26
        return [
27 1
            'dependencies' => $this->getDependencies()
28
        ];
29
    }
30
31
    /**
32
     * @return array[]
33
     */
34 2
    public function getDependencies(): array
35
    {
36
        return [
37 2
            'factories' => [
38
                JwtAuthMiddleware::class     => JwtAuthMiddlewareFactory::class,
39
                JwtService::class            => JwtServiceFactory::class
40
            ],
41
        ];
42
    }
43
}
44