CacheNamespaceModule::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Package\Module;
6
7
use Ray\Di\AbstractModule;
8
9
class CacheNamespaceModule extends AbstractModule
10
{
11
    /** @var string */
12
    private $cacheNamespace;
13
14
    public function __construct(string $cacheNamespace, ?AbstractModule $module = null)
15
    {
16
        $this->cacheNamespace = $cacheNamespace;
17
        parent::__construct($module);
18
    }
19
20
    /**
21
     * {@inheritdoc}
22
     */
23
    protected function configure(): void
24
    {
25
        $this->bind()->annotatedWith('cache_namespace')->toInstance($this->cacheNamespace);
26
    }
27
}
28