Completed
Push β€” master ( d34ae1...d2cd4a )
by kill
10:24
created

Mysql   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDb() 0 7 2
1
<?php
2
/**
3
 * Created by IntelliJ IDEA.
4
 * User: rozbo
5
 * Date: 2017/2/27
6
 * Time: δΈ‹εˆ2:45
7
 */
8
9
namespace puck;
10
11
12
class Mysql extends \MysqliDb{
13
14
    static public function getDb($db){
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
15
        static $dbList;
16
        if(!isset($dbList[$db])){
17
            $dbList[$db]=new \MysqliDb(config('db.'.$db));
18
        }
19
        return $dbList[$db];
20
    }
21
22
23
}