Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Transaction extends QueryBuilderHandler |
||
6 | { |
||
7 | /** |
||
8 | * Commit the database changes |
||
9 | * |
||
10 | * @throws TransactionHaltException |
||
11 | */ |
||
12 | public function commit(): void |
||
13 | { |
||
14 | $this->dbInstance->query('COMMIT'); |
||
15 | throw new TransactionHaltException(); |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * Rollback the database changes |
||
20 | * |
||
21 | * @throws TransactionHaltException |
||
22 | */ |
||
23 | public function rollback(): void |
||
27 | } |
||
28 | } |
||
29 |