| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 7479 | public function startQuery($sql, ?array $params = null, ?array $types = null) |
|
| 46 | { |
||
| 47 | 7479 | if (! $this->enabled) { |
|
| 48 | 27 | return; |
|
| 49 | } |
||
| 50 | |||
| 51 | 7452 | $this->start = microtime(true); |
|
| 52 | $log = [ |
||
| 53 | 7452 | 'sql' => $sql, |
|
| 54 | 7452 | 'params' => $params, |
|
| 55 | 7452 | 'types' => $types, |
|
| 56 | 7452 | 'executionMS' => 0, |
|
| 57 | ]; |
||
| 58 | |||
| 59 | 7452 | if ($this->includeSource !== self::SOURCE_DISABLED) { |
|
| 60 | $log['querySource'] = $this->findQuerySource(); |
||
| 61 | } |
||
| 62 | |||
| 63 | 7452 | $this->queries[++$this->currentQuery] = $log; |
|
| 64 | 7452 | } |
|
| 88 |