Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 491-506 (lines=16) @@
488
     *
489
     * @return bool
490
     */
491
    public function commitTransaction(): bool
492
    {
493
        --$this->transactionLevel;
494
495
        if ($this->transactionLevel == 0) {
496
            if ($this->isProfiling()) {
497
                $this->logger()->info('Commit transaction');
498
            }
499
500
            return $this->getPDO()->commit();
501
        }
502
503
        $this->savepointRelease($this->transactionLevel + 1);
504
505
        return true;
506
    }
507
508
    /**
509
     * Rollback the active database transaction.
@@ 513-528 (lines=16) @@
510
     *
511
     * @return bool
512
     */
513
    public function rollbackTransaction(): bool
514
    {
515
        --$this->transactionLevel;
516
517
        if ($this->transactionLevel == 0) {
518
            if ($this->isProfiling()) {
519
                $this->logger()->info('Rollback transaction');
520
            }
521
522
            return $this->getPDO()->rollBack();
523
        }
524
525
        $this->savepointRollback($this->transactionLevel + 1);
526
527
        return true;
528
    }
529
530
    /**
531
     * @return array