| 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 | 1 |
| 1 | <?php |
||
| 32 | 3 | public function getCurrentSchema() |
|
| 33 | { |
||
| 34 | 3 | $query = 'SELECT DATABASE() as current_schema'; |
|
| 35 | try { |
||
| 36 | 3 | $results = $this->adapter->query($query); |
|
| 37 | 3 | if (count($results) == 0 || $results[0]['current_schema'] === null) { |
|
| 38 | 2 | return false; |
|
| 39 | } |
||
| 40 | 3 | } catch (\Exception $e) { |
|
| 41 | throw new Exception\RuntimeException($e->getMessage()); |
||
| 42 | } |
||
| 43 | 3 | return $results[0]['current_schema']; |
|
| 44 | } |
||
| 45 | } |
||
| 46 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..