Passed
Pull Request — master (#23)
by Adrien
17:46 queued 04:32
created

Middleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A wrap() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Ecodev\Felix\DBAL\Logging;
6
7
use Doctrine\DBAL\Driver as DriverInterface;
8
use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface;
9
10
/**
11
 * Log SQL queries including their timing (so the query will be logged after its execution).
12
 */
13
final class Middleware implements MiddlewareInterface
14
{
15
    public function wrap(DriverInterface $driver): DriverInterface
16
    {
17
        return new Driver($driver);
18
    }
19
}
20