Completed
Pull Request — master (#8)
by
unknown
03:42
created

IlluminatePsrCacheServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 13
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 7 1
1
<?php
2
3
namespace Madewithlove\IlluminatePsrCacheBridge\Providers;
4
5
use Illuminate\Contracts\Cache\Repository;
6
use Illuminate\Support\ServiceProvider;
7
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool;
8
use Psr\Cache\CacheItemPoolInterface;
9
10
class IlluminatePsrCacheServiceProvider extends ServiceProvider
11
{
12
    /**
13
     * @return void
14
     */
15
    public function register()
16
    {
17
        $this->app->singleton(CacheItemPoolInterface::class, function () {
18
            $repository = $this->app->make(Repository::class);
19
            return new CacheItemPool($repository);
20
        });
21
    }
22
}
23