Completed
Push — 1.x ( e7c13e...e54d42 )
by Akihito
11s
created

CacheVersionModule::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of the BEAR.QueryRepository package.
4
 *
5
 * @license http://opensource.org/licenses/MIT MIT
6
 */
7
namespace BEAR\QueryRepository;
8
9
use BEAR\RepositoryModule\Annotation\CacheVersion;
10
use Ray\Di\AbstractModule;
11
12
class CacheVersionModule extends AbstractModule
13
{
14
    /**
15
     * @var string
16
     */
17
    private $version;
18
19
    /**
20
     * @param string              $cacheVersion
21
     * @param AbstractModule|null $module
22
     */
23 1
    public function __construct($cacheVersion, AbstractModule $module = null)
24
    {
25 1
        $this->version = $cacheVersion;
26 1
        parent::__construct($module);
27 1
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 1
    protected function configure()
33
    {
34 1
        $this->bind()->annotatedWith(CacheVersion::class)->toInstance($this->version);
35 1
    }
36
}
37