Code Duplication    Length = 16-16 lines in 2 locations

source/Spiral/Database/Entities/Driver.php 2 locations

@@ 312-327 (lines=16) @@
309
     *
310
     * @return bool
311
     */
312
    public function commitTransaction(): bool
313
    {
314
        --$this->transactionLevel;
315
316
        if ($this->transactionLevel == 0) {
317
            if ($this->isProfiling()) {
318
                $this->logger()->info('Commit transaction');
319
            }
320
321
            return $this->getPDO()->commit();
322
        }
323
324
        $this->savepointRelease($this->transactionLevel + 1);
325
326
        return true;
327
    }
328
329
    /**
330
     * Rollback the active database transaction.
@@ 334-349 (lines=16) @@
331
     *
332
     * @return bool
333
     */
334
    public function rollbackTransaction(): bool
335
    {
336
        --$this->transactionLevel;
337
338
        if ($this->transactionLevel == 0) {
339
            if ($this->isProfiling()) {
340
                $this->logger()->info('Rollback transaction');
341
            }
342
343
            return $this->getPDO()->rollBack();
344
        }
345
346
        $this->savepointRollback($this->transactionLevel + 1);
347
348
        return true;
349
    }
350
351
    /**
352
     * Set transaction isolation level, this feature may not be supported by specific database