Code Duplication    Length = 7-8 lines in 3 locations

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

@@ 319-326 (lines=8) @@
316
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
317
     *                     identifier.
318
     */
319
    protected function savepointCreate(string $name)
320
    {
321
        if ($this->isProfiling()) {
322
            $this->logger()->info("Creating savepoint '{$name}'");
323
        }
324
325
        $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}"));
326
    }
327
328
    /**
329
     * Commit/release savepoint.
@@ 336-343 (lines=8) @@
333
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
334
     *                     identifier.
335
     */
336
    protected function savepointRelease(string $name)
337
    {
338
        if ($this->isProfiling()) {
339
            $this->logger()->info("Releasing savepoint '{$name}'");
340
        }
341
342
        $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}"));
343
    }
344
345
    /**
346
     * Rollback savepoint.
@@ 353-359 (lines=7) @@
350
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
351
     *                     identifier.
352
     */
353
    protected function savepointRollback(string $name)
354
    {
355
        if ($this->isProfiling()) {
356
            $this->logger()->info("Rolling back savepoint '{$name}'");
357
        }
358
        $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}"));
359
    }
360
}
361