Laravel5420RedisSentinelManager   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A resolve() 0 4 1
1
<?php
2
3
namespace Monospice\LaravelRedisSentinel\Manager;
4
5
use Monospice\LaravelRedisSentinel\Manager\VersionedRedisSentinelManager;
6
7
/**
8
 * Enables Laravel's Redis database driver to accept configuration options for
9
 * Redis Sentinel connections independently. Supports Laravel version 5.4.20
10
 * and greater.
11
 *
12
 * In version 5.4.20, Laravel modified the public interface of the RedisManager
13
 * class. The visibility of 'RedisManager::resolve()' changed to 'public'.
14
 *
15
 * @category Package
16
 * @package  Monospice\LaravelRedisSentinel
17
 * @author   Cy Rossignol <[email protected]>
18
 * @license  See LICENSE file
19
 * @link     http://github.com/monospice/laravel-redis-sentinel-drivers
20
 */
21
class Laravel5420RedisSentinelManager extends VersionedRedisSentinelManager
22
{
23
    /**
24
     * Get the Redis Connection instance represented by the specified name
25
     *
26
     * @param string|null $name The name of the connection as defined in the
27
     * configuration
28
     *
29
     * @return \Illuminate\Redis\Connections\PredisConnection The configured
30
     * Redis Connection instance
31
     *
32
     * @throws InvalidArgumentException If attempting to initialize a Redis
33
     * Cluster connection
34
     * @throws InvalidArgumentException If the specified connection is not
35
     * defined in the configuration
36
     */
37
    public function resolve($name = null)
38
    {
39
        return $this->resolveConnection($name);
40
    }
41
}
42