CacheVersionModule::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

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