Failed Conditions
Pull Request — master (#23)
by Adrien
03:02
created

Middleware::wrap()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 1
crap 2
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