Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
14 | 3 | public function createFromEntityManager(EntityManagerInterface $entityManager): \mysqli |
|
15 | { |
||
16 | 3 | $params = $entityManager->getConnection()->getParams(); |
|
17 | |||
18 | 3 | $conn = new \mysqli($params['host'], $params['user'], $params['password'], $params['dbname']); |
|
19 | 3 | mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); |
|
20 | |||
21 | 3 | return $conn; |
|
22 | } |
||
24 |