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

BacktraceLogger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stopQuery() 0 3 1
A startQuery() 0 5 1
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