| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 6 | public function connect() |
|
| 32 | { |
||
| 33 | 6 | $this->disconnect(); |
|
| 34 | $username = $this->getConfigurationValue('username'); |
||
| 35 | $password = $this->getConfigurationValue('password'); |
||
| 36 | $options = $this->getConfigurationValue('options'); |
||
| 37 | $this->instance = new PDO($this->getConfigurationValue('dsn'), $username, $password, $options); |
||
| 38 | $this->instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
||
| 39 | return $this; |
||
| 40 | } |
||
| 56 |