Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1226-1236 (lines=11) @@
1223
    /**
1224
     * @return \Doctrine\DBAL\Driver\Connection|false
1225
     */
1226
    private function getDoctrinePDOConnection()
1227
    {
1228
        if ($this->doctrine_connection) {
1229
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1230
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1231
                return $doctrineWrappedConnection;
1232
            }
1233
        }
1234
1235
        return false;
1236
    }
1237
1238
    /**
1239
     * Get errors from "$this->errors".
@@ 1517-1527 (lines=11) @@
1514
    /**
1515
     * @return bool
1516
     */
1517
    public function isDoctrinePDOConnection(): bool
1518
    {
1519
        if ($this->doctrine_connection) {
1520
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1521
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1522
                return true;
1523
            }
1524
        }
1525
1526
        return false;
1527
    }
1528
1529
    /**
1530
     * Check if db-connection is ready.