EchoQueryLogger   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
rs 10

2 Methods

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