AsyncRedisConnector   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

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