SentinelConnector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A connect() 0 10 1
1
<?php
2
3
namespace RedisSentinel\Laravel;
4
5
use Illuminate\Queue\Connectors\RedisConnector;
6
use Illuminate\Support\Arr;
7
8
class SentinelConnector extends RedisConnector
9
{
10
    /**
11
     * Establish a queue connection.
12
     *
13
     * @param  array  $config
14
     * @return \Illuminate\Contracts\Queue\Queue
15
     */
16
    public function connect(array $config)
17
    {
18
        $queue = new SentinelQueue(
19
            $this->redis, $config['queue'],
20
            Arr::get($config, 'connection', $this->connection),
21
            Arr::get($config, 'retry_after', 60)
22
        );
23
24
        return $queue;
25
    }
26
}
27