Laravel540RedisSentinelManager::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 versions up to
10
 * 5.4.19.
11
 *
12
 * @category Package
13
 * @package  Monospice\LaravelRedisSentinel
14
 * @author   Cy Rossignol <[email protected]>
15
 * @license  See LICENSE file
16
 * @link     http://github.com/monospice/laravel-redis-sentinel-drivers
17
 */
18
class Laravel540RedisSentinelManager extends VersionedRedisSentinelManager
19
{
20
    /**
21
     * Get the Redis Connection instance represented by the specified name
22
     *
23
     * @param string $name The name of the connection as defined in the
24
     * configuration
25
     *
26
     * @return \Illuminate\Redis\Connections\PredisConnection The configured
27
     * Redis Connection instance
28
     *
29
     * @throws InvalidArgumentException If attempting to initialize a Redis
30
     * Cluster connection
31
     * @throws InvalidArgumentException If the specified connection is not
32
     * defined in the configuration
33
     */
34
    protected function resolve($name)
35
    {
36
        return $this->resolveConnection($name);
37
    }
38
}
39