Code Duplication    Length = 7-8 lines in 3 locations

source/Spiral/Database/Entities/Prototypes/PDODriver.php 3 locations

@@ 594-601 (lines=8) @@
591
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
592
     *                     identifier.
593
     */
594
    protected function savepointCreate(string $name)
595
    {
596
        if ($this->isProfiling()) {
597
            $this->logger()->info("Creating savepoint '{$name}'");
598
        }
599
600
        $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}"));
601
    }
602
603
    /**
604
     * Commit/release savepoint.
@@ 611-618 (lines=8) @@
608
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
609
     *                     identifier.
610
     */
611
    protected function savepointRelease(string $name)
612
    {
613
        if ($this->isProfiling()) {
614
            $this->logger()->info("Releasing savepoint '{$name}'");
615
        }
616
617
        $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}"));
618
    }
619
620
    /**
621
     * Rollback savepoint.
@@ 628-634 (lines=7) @@
625
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
626
     *                     identifier.
627
     */
628
    protected function savepointRollback(string $name)
629
    {
630
        if ($this->isProfiling()) {
631
            $this->logger()->info("Rolling back savepoint '{$name}'");
632
        }
633
        $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}"));
634
    }
635
636
    /**
637
     * Convert DateTime object into local database representation. Driver will automatically force