Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1196-1206 (lines=11) @@
1193
    /**
1194
     * @return \Doctrine\DBAL\Driver\Connection|false
1195
     */
1196
    private function getDoctrinePDOConnection()
1197
    {
1198
        if ($this->doctrine_connection) {
1199
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1200
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1201
                return $doctrineWrappedConnection;
1202
            }
1203
        }
1204
1205
        return false;
1206
    }
1207
1208
    /**
1209
     * Get errors from "$this->errors".
@@ 1476-1486 (lines=11) @@
1473
    /**
1474
     * @return bool
1475
     */
1476
    public function isDoctrinePDOConnection(): bool
1477
    {
1478
        if ($this->doctrine_connection) {
1479
            $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1480
            if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1481
                return true;
1482
            }
1483
        }
1484
1485
        return false;
1486
    }
1487
1488
    /**
1489
     * Check if db-connection is ready.