ConfigProvider::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * This File is Part of the Validus package.
4
 *
5
 * @copyright (c) 2018 Validus <https://github.com/ValidusPHP/>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Validus\Cache;
14
15
use Psr\Cache\CacheItemPoolInterface;
16
use Psr\SimpleCache\CacheInterface;
17
use Validus\Cache\Middleware\CacheResetMiddleware;
18
use Validus\Cache\Middleware\CacheResetMiddlewareFactory;
19
use Validus\Cache\Simple\CacheFactory;
20
21
class ConfigProvider
22
{
23
    /**
24
     * @return array
25
     */
26
    public function __invoke(): array
27
    {
28
        return [
29
            'dependencies' => $this->getDependencies(),
30
        ];
31
    }
32
33
    /**
34
     * @return array
35
     */
36
    public function getDependencies(): array
37
    {
38
        return [
39
            'factories' => [
40
                CacheInterface::class => CacheFactory::class,
41
                CacheItemPoolInterface::class => CacheItemPoolFactory::class,
42
                CacheResetMiddleware::class => CacheResetMiddlewareFactory::class,
43
            ],
44
        ];
45
    }
46
}
47