Code Duplication    Length = 7-11 lines in 3 locations

includes/db/DatabaseMssql.php 1 location

@@ 1373-1382 (lines=10) @@
1370
	 * @return bool|ResultWrapper
1371
	 * @since 1.18
1372
	 */
1373
	public function dropTable( $tableName, $fName = __METHOD__ ) {
1374
		if ( !$this->tableExists( $tableName, $fName ) ) {
1375
			return false;
1376
		}
1377
1378
		// parent function incorrectly appends CASCADE, which we don't want
1379
		$sql = "DROP TABLE " . $this->tableName( $tableName );
1380
1381
		return $this->query( $sql, $fName );
1382
	}
1383
1384
	/**
1385
	 * Called in the installer and updater.

includes/db/Database.php 1 location

@@ 3401-3411 (lines=11) @@
3398
	 * @return bool|ResultWrapper
3399
	 * @since 1.18
3400
	 */
3401
	public function dropTable( $tableName, $fName = __METHOD__ ) {
3402
		if ( !$this->tableExists( $tableName, $fName ) ) {
3403
			return false;
3404
		}
3405
		$sql = "DROP TABLE " . $this->tableName( $tableName );
3406
		if ( $this->cascadingDeletes() ) {
3407
			$sql .= " CASCADE";
3408
		}
3409
3410
		return $this->query( $sql, $fName );
3411
	}
3412
3413
	/**
3414
	 * Get search engine class. All subclasses of this need to implement this

includes/db/DatabaseMysqlBase.php 1 location

@@ 1254-1260 (lines=7) @@
1251
	 * @param string $fName
1252
	 * @return bool|ResultWrapper
1253
	 */
1254
	public function dropTable( $tableName, $fName = __METHOD__ ) {
1255
		if ( !$this->tableExists( $tableName, $fName ) ) {
1256
			return false;
1257
		}
1258
1259
		return $this->query( "DROP TABLE IF EXISTS " . $this->tableName( $tableName ), $fName );
1260
	}
1261
1262
	/**
1263
	 * @return array