Completed
Pull Request — master (#3513)
by Dimitri
185:55 queued 120:54
created

BacktraceLogger::startQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace Doctrine\DBAL\Logging;
4
5
class BacktraceLogger extends DebugStack
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function startQuery($sql, ?array $params = null, ?array $types = null)
11
    {
12
        parent::startQuery($sql, $params, $types);
13
14
        $this->queries[$this->currentQuery]['backtrace'] = array_reverse(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS));
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function stopQuery()
21
    {
22
        parent::stopQuery();
23
    }
24
}
25