Passed
Push — master ( 35a242...04c846 )
by Mauro
02:00
created

RedisHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConnection() 0 7 2
1
<?php
2
3
namespace SimpleDIC\Dummy;
4
5
class RedisHandler
6
{
7
8
    /**
9
     * @var Client
10
     */
11
    private $client;
12
13
    /**
14
     * @return Client
15
     */
16
    public function getConnection()
17
    {
18
        if ($this->client === null) {
19
            $this->client = new Client('mauretto78', '12432');
20
        }
21
22
        return $this->client;
23
    }
24
}
25