Completed
Push — 1.x ( c86fd3...4b8bd5 )
by Akihito
14s queued 12s
created

Psr6NullModule::configure()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace BEAR\Package\Module;
6
7
use Psr\Cache\CacheItemPoolInterface;
8
use Ray\Di\AbstractModule;
9
use Ray\Di\Scope;
10
use Ray\PsrCacheModule\Annotation\Local;
11
use Ray\PsrCacheModule\Annotation\Shared;
12
use Symfony\Component\Cache\Adapter\NullAdapter;
13
14
final class Psr6NullModule extends AbstractModule
15
{
16
    protected function configure(): void
17
    {
18
        $this->bind(CacheItemPoolInterface::class)->annotatedWith(Local::class)->to(NullAdapter::class)->in(Scope::SINGLETON);
19
        $this->bind(CacheItemPoolInterface::class)->annotatedWith(Shared::class)->to(NullAdapter::class)->in(Scope::SINGLETON);
20
    }
21
}
22