| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 10 | public static function getDriver() |
||
|
|
|||
| 11 | { |
||
| 12 | if(self::$db == null) { |
||
| 13 | self::$db = \ntentan\atiaa\Driver::getConnection(self::$defaultSettings); |
||
| 14 | self::$db->setCleanDefaults(true); |
||
| 15 | |||
| 16 | try { |
||
| 17 | self::$db->getPDO()->setAttribute(\PDO::ATTR_AUTOCOMMIT, false); |
||
| 18 | } catch (\PDOException $e) { |
||
| 19 | // Just do nothing for drivers which do not allow turning off autocommit |
||
| 20 | } |
||
| 21 | } |
||
| 22 | return self::$db; |
||
| 23 | } |
||
| 24 | |||
| 47 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.