Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

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