Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1245-1255 (lines=11) @@
1242
    /**
1243
     * @return \Doctrine\DBAL\Driver\Connection|false
1244
     */
1245
    private function getDoctrinePDOConnection()
1246
    {
1247
        if ($this->doctrine_connection) {
1248
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1249
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1250
                return $doctrineWrappedConnection;
1251
            }
1252
        }
1253
1254
        return false;
1255
    }
1256
1257
    /**
1258
     * Get errors from "$this->errors".
@@ 1540-1550 (lines=11) @@
1537
    /**
1538
     * @return bool
1539
     */
1540
    public function isDoctrinePDOConnection(): bool
1541
    {
1542
        if ($this->doctrine_connection) {
1543
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1544
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1545
                return true;
1546
            }
1547
        }
1548
1549
        return false;
1550
    }
1551
1552
    /**
1553
     * Check if db-connection is ready.