Completed
Push — master ( d0c6f2...e28c79 )
by Avtandil
03:11
created

CacheManager   A

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 6
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
 * This file is part of the Laravel Lodash package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
declare(strict_types=1);
11
12
namespace Longman\LaravelLodash\Cache;
13
14
use Illuminate\Cache\CacheManager as BaseCacheManager;
15
16
class CacheManager extends BaseCacheManager
17
{
18
    /**
19
     * Create an instance of the Redis cache driver.
20
     *
21
     * @param  array  $config
22
     * @return \Longman\LaravelLodash\Cache\RedisStore
23
     */
24
    protected function createRedisDriver(array $config)
25
    {
26
        $redis = $this->app['redis'];
27
28
        $connection = $config['connection'] ?? 'default';
29
30
        return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection));
31
    }
32
}
33