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

RedisHandler::getConnection()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 2
nc 2
nop 0
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