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 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 5
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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 1
 */
18
final class CacheVersionModule extends AbstractModule
19 1
{
20 1
    public function __construct(
21 1
        private readonly string $version,
22
        AbstractModule|null $module = null,
23
    ) {
24
        parent::__construct($module);
25
    }
26 1
27
    /**
28 1
     * {@inheritDoc}
29 1
     */
30
    #[Override]
31
    protected function configure(): void
32
    {
33
        $this->install(new CacheNamespaceModule($this->version));
34
    }
35
}
36