Code Duplication    Length = 7-8 lines in 3 locations

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

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