Code Duplication    Length = 11-11 lines in 2 locations

src/voku/db/DB.php 2 locations

@@ 1187-1197 (lines=11) @@
1184
  /**
1185
   * @return false|\Doctrine\DBAL\Driver\Connection
1186
   */
1187
  private function getDoctrinePDOConnection()
1188
  {
1189
    if ($this->doctrine_connection) {
1190
      $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1191
      if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1192
        return $doctrineWrappedConnection;
1193
      }
1194
    }
1195
1196
    return false;
1197
  }
1198
1199
  /**
1200
   * Get errors from "$this->errors".
@@ 1469-1479 (lines=11) @@
1466
  /**
1467
   * @return bool
1468
   */
1469
  public function isDoctrinePDOConnection(): bool
1470
  {
1471
    if ($this->doctrine_connection) {
1472
      $doctrineWrappedConnection = $this->doctrine_connection->getWrappedConnection();
1473
      if ($doctrineWrappedConnection instanceof \Doctrine\DBAL\Driver\PDOConnection) {
1474
        return true;
1475
      }
1476
    }
1477
1478
    return false;
1479
  }
1480
1481
  /**
1482
   * Check if db-connection is ready.