EchoQueryLogger::stopQuery()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Communibase\Logging;
4
5
/**
6
 * A Query logger that logs to the standard output using echo/var_dump.
7
 */
8
class EchoQueryLogger implements QueryLogger
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function startQuery($query, array $params = null, array $data = null)
14
    {
15
        echo $query . PHP_EOL;
16
17
        if ($params) {
18
            var_dump($params);
19
        }
20
21
        if ($data) {
22
            var_dump($data);
23
        }
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function stopQuery()
30
    {
31
    }
32
}
33