Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4.0313 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | 2 | public function getCurrentSchema() |
|
38 | { |
||
39 | 2 | $query = 'SELECT DATABASE() as current_schema'; |
|
40 | try { |
||
41 | 2 | $results = $this->adapter->query($query); |
|
42 | 2 | if (count($results) == 0 || $results[0]['current_schema'] === null) { |
|
43 | 2 | return false; |
|
44 | } |
||
45 | 2 | } catch (\Exception $e) { |
|
46 | throw new Exception\RuntimeException($e->getMessage()); |
||
47 | } |
||
48 | 2 | return $results[0]['current_schema']; |
|
49 | } |
||
50 | |||
61 |