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

Psr6NullModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
c 0
b 0
f 0
dl 0
loc 6
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
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