Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

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