CacheVersionModule   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 16
rs 10
ccs 5
cts 5
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A configure() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\QueryRepository;
6
7
use Override;
8
use Ray\Di\AbstractModule;
9
use Ray\PsrCacheModule\CacheNamespaceModule;
10
11
/**
12
 * Provides CacheNamespace and derived bindings
13
 *
14
 * The following module is installed:
15
 *
16
 * -CacheNamespaceModule
17
 */
18
final class CacheVersionModule extends AbstractModule
19
{
20
    public function __construct(
21
        private readonly string $version,
22
        AbstractModule|null $module = null,
23 1
    ) {
24
        parent::__construct($module);
25 1
    }
26 1
27 1
    /**
28
     * {@inheritDoc}
29
     */
30
    #[Override]
31
    protected function configure(): void
32 1
    {
33
        $this->install(new CacheNamespaceModule($this->version));
34 1
    }
35
}
36