Code Duplication    Length = 7-10 lines in 4 locations

includes/db/DatabaseMssql.php 1 location

@@ 1344-1353 (lines=10) @@
1341
	 * @return bool|ResultWrapper
1342
	 * @since 1.18
1343
	 */
1344
	public function dropTable( $tableName, $fName = __METHOD__ ) {
1345
		if ( !$this->tableExists( $tableName, $fName ) ) {
1346
			return false;
1347
		}
1348
1349
		// parent function incorrectly appends CASCADE, which we don't want
1350
		$sql = "DROP TABLE " . $this->tableName( $tableName );
1351
1352
		return $this->query( $sql, $fName );
1353
	}
1354
1355
	/**
1356
	 * Called in the installer and updater.

includes/libs/rdbms/database/DatabaseMysqlBase.php 1 location

@@ 1264-1270 (lines=7) @@
1261
	 * @param string $fName
1262
	 * @return bool|ResultWrapper
1263
	 */
1264
	public function dropTable( $tableName, $fName = __METHOD__ ) {
1265
		if ( !$this->tableExists( $tableName, $fName ) ) {
1266
			return false;
1267
		}
1268
1269
		return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
1270
	}
1271
1272
	/**
1273
	 * Get status information from SHOW STATUS in an associative array

includes/libs/rdbms/database/DatabaseSqlite.php 1 location

@@ 1030-1037 (lines=8) @@
1027
	 * @return bool|ResultWrapper
1028
	 * @throws DBReadOnlyError
1029
	 */
1030
	public function dropTable( $tableName, $fName = __METHOD__ ) {
1031
		if ( !$this->tableExists( $tableName, $fName ) ) {
1032
			return false;
1033
		}
1034
		$sql = "DROP TABLE " . $this->tableName( $tableName );
1035
1036
		return $this->query( $sql, $fName );
1037
	}
1038
1039
	protected function requiresDatabaseUser() {
1040
		return false; // just a file

includes/libs/rdbms/database/Database.php 1 location

@@ 3312-3319 (lines=8) @@
3309
	 * @return bool|ResultWrapper
3310
	 * @since 1.18
3311
	 */
3312
	public function dropTable( $tableName, $fName = __METHOD__ ) {
3313
		if ( !$this->tableExists( $tableName, $fName ) ) {
3314
			return false;
3315
		}
3316
		$sql = "DROP TABLE " . $this->tableName( $tableName ) . " CASCADE";
3317
3318
		return $this->query( $sql, $fName );
3319
	}
3320
3321
	public function getInfinity() {
3322
		return 'infinity';