RedisAwareTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setRedisDriver() 0 4 1
A getRedisDriver() 0 4 1
1
<?php
2
3
namespace Ps2alerts\Api\Contract;
4
5
use Predis\Client;
6
7
trait RedisAwareTrait
8
{
9
    /**
10
     * @var Client
11
     */
12
    protected $redis;
13
14
    /**
15
     * Sets the Redis driver
16
     *
17
     * @param Client $redis
18
     */
19
    public function setRedisDriver(Client $redis)
20
    {
21
        $this->redis = $redis;
22
    }
23
24
    /**
25
     * Gets the Redis driver
26
     *
27
     * @return \Predis\Client
28
     */
29
    public function getRedisDriver()
30
    {
31
        return $this->redis;
32
    }
33
}
34