| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1.0013 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | 4 | public function openConnection() |
|
| 10 | 4 | { |
|
| 11 | 4 | $host = $this->getHost(); |
|
| 12 | 4 | $db = $this->getDatabase(); |
|
| 13 | 4 | $user = $this->getUser(); |
|
| 14 | 4 | $pass = $this->getPass(); |
|
| 15 | 4 | $this->connection = new PDO('mysql:host='.$host.';dbname='.$db, $user, $pass, [ |
|
| 16 | 4 | PDO::ATTR_EMULATE_PREPARES => false, |
|
| 17 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, |
||
| 18 | ]); |
||
| 19 | } |
||
| 20 | |||
| 26 | } |