Passed
Push — master ( f0273f...a7db3c )
by Afshin
02:04
created

Session::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: afshin
5
 * Date: 12/8/17
6
 * Time: 1:01 AM
7
 */
8
9
namespace Core\Services;
10
11
12
13
class Session
14
{
15
    public $handler;
16
    public function init($driver)
17
    {
18
        $namespace = 'Core\\Handlers\\Session\\';
19
20
        $className = $namespace.ucfirst($driver).'Handler';
21
        $this->handler = new $className();
22
23
        return $this->handler;
24
    }
25
26
}