| Total Complexity | 7 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class Connection extends AbstractConnectionMiddleware |
||
| 13 | { |
||
| 14 | public function __construct(ConnectionInterface $connection) |
||
| 15 | { |
||
| 16 | parent::__construct($connection); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function prepare(string $sql): DriverStatement |
||
| 20 | { |
||
| 21 | return new Statement(parent::prepare($sql), $sql); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function query(string $sql): Result |
||
| 25 | { |
||
| 26 | _log()->debug('Executing query: {sql}', ['sql' => $sql]); |
||
| 27 | |||
| 28 | return parent::query($sql); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function exec(string $sql): int|string |
||
| 32 | { |
||
| 33 | _log()->debug('Executing statement: {sql}', ['sql' => $sql]); |
||
| 34 | |||
| 35 | return parent::exec($sql); |
||
| 36 | } |
||
| 37 | |||
| 38 | public function beginTransaction(): void |
||
| 39 | { |
||
| 40 | _log()->debug('Beginning transaction'); |
||
| 41 | |||
| 42 | parent::beginTransaction(); |
||
| 43 | } |
||
| 44 | |||
| 45 | public function commit(): void |
||
| 50 | } |
||
| 51 | |||
| 52 | public function rollBack(): void |
||
| 53 | { |
||
| 57 | } |
||
| 58 | } |
||
| 59 |