CacheManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A createRedisDriver() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Longman\LaravelLodash\Cache;
6
7
use Illuminate\Cache\CacheManager as BaseCacheManager;
8
9
class CacheManager extends BaseCacheManager
10
{
11
    /**
12
     * Create an instance of the Redis cache driver.
13
     *
14
     * @param  array  $config
15
     * @return \Longman\LaravelLodash\Cache\RedisStore
16
     */
17
    protected function createRedisDriver(array $config)
18
    {
19
        $redis = $this->app['redis'];
20
21
        $connection = $config['connection'] ?? 'default';
22
23
        return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection));
24
    }
25
}
26