Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
6 | class ClosureQueryLogger implements QueryLogger { |
||
7 | /** @var callable(string, float, string, Throwable|null): void */ |
||
8 | private $fn; |
||
9 | |||
10 | /** |
||
11 | * @param callable(string, float, string, Throwable|null):void $fn |
||
12 | */ |
||
13 | public function __construct(callable $fn) { |
||
14 | $this->fn = $fn; |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @inheritDoc |
||
19 | */ |
||
20 | public function log(string $query, float $duration): void { |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @inheritDoc |
||
26 | */ |
||
27 | public function logError(string $query, Throwable $exception, float $duration): void { |
||
31 |