Laravel5420RedisSentinelManager::resolve()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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