Code Duplication    Length = 7-8 lines in 3 locations

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

@@ 325-332 (lines=8) @@
322
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
323
     *                     identifier.
324
     */
325
    protected function savepointCreate(string $name)
326
    {
327
        if ($this->isProfiling()) {
328
            $this->logger()->info("Creating savepoint '{$name}'");
329
        }
330
331
        $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}"));
332
    }
333
334
    /**
335
     * Commit/release savepoint.
@@ 342-349 (lines=8) @@
339
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
340
     *                     identifier.
341
     */
342
    protected function savepointRelease(string $name)
343
    {
344
        if ($this->isProfiling()) {
345
            $this->logger()->info("Releasing savepoint '{$name}'");
346
        }
347
348
        $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}"));
349
    }
350
351
    /**
352
     * Rollback savepoint.
@@ 359-365 (lines=7) @@
356
     * @param string $name Savepoint name/id, must not contain spaces and be valid database
357
     *                     identifier.
358
     */
359
    protected function savepointRollback(string $name)
360
    {
361
        if ($this->isProfiling()) {
362
            $this->logger()->info("Rolling back savepoint '{$name}'");
363
        }
364
        $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}"));
365
    }
366
}
367