Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | private function forwardLog(array $query): void |
||
30 | { |
||
31 | $extra = [ |
||
32 | 'params' => $query['params'], |
||
33 | 'time' => number_format($query['executionMS'], 6), |
||
34 | ]; |
||
35 | |||
36 | // Here we cannot inject the logger via DI, or it would be created too early and |
||
37 | // break unit tests by creating two parallel connection to DB and thus timeout |
||
38 | // when a tests's transaction is pending but a log is trying to be written on the other connection |
||
39 | _log()->debug($query['sql'], $extra); |
||
40 | } |
||
42 |