CodeIgniterDriver   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
eloc 3
c 5
b 0
f 0
dl 0
loc 13
ccs 3
cts 3
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
1
<?php
2
3
namespace Rougin\Describe\Driver;
4
5
/**
6
 * Codeigniter Driver
7
 *
8
 * A database driver specifically used for Codeigniter.
9
 * NOTE: To be removed in v2.0.0. Use "DatabaseDriver" instead.
10
 *
11
 * @package Describe
12
 * @author  Rougin Gutib <[email protected]>
13
 */
14
class CodeIgniterDriver extends DatabaseDriver
15
{
16
    /**
17
     * Initializes the driver instance.
18
     *
19
     * @param array $database
20
     */
21 30
    public function __construct(array $database)
22
    {
23
        // NOTE: To be removed in v2.0.0. Use $database['default'] outside.
24 30
        isset($database['default']) && $database = $database['default'];
25
26 30
        $this->driver = $this->driver($database['dbdriver'], $database);
27 30
    }
28
}
29