Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1255-1265 (lines=11) @@
1252
    /**
1253
     * @return \Doctrine\DBAL\Driver\Connection|false
1254
     */
1255
    private function getDoctrinePDOConnection()
1256
    {
1257
        if ($this->doctrine_connection) {
1258
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1259
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1260
                return $doctrineWrappedConnection;
1261
            }
1262
        }
1263
1264
        return false;
1265
    }
1266
1267
    /**
1268
     * Get errors from "$this->errors".
@@ 1550-1560 (lines=11) @@
1547
    /**
1548
     * @return bool
1549
     */
1550
    public function isDoctrinePDOConnection(): bool
1551
    {
1552
        if ($this->doctrine_connection) {
1553
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1554
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1555
                return true;
1556
            }
1557
        }
1558
1559
        return false;
1560
    }
1561
1562
    /**
1563
     * Check if db-connection is ready.