Code Duplication    Length = 7-7 lines in 2 locations

includes/api/ApiQueryRecentChanges.php 1 location

@@ 179-185 (lines=7) @@
176
177
		$this->addWhereFld( 'rc_namespace', $params['namespace'] );
178
179
		if ( !is_null( $params['type'] ) ) {
180
			try {
181
				$this->addWhereFld( 'rc_type', RecentChange::parseToRCType( $params['type'] ) );
182
			} catch ( Exception $e ) {
183
				ApiBase::dieDebug( __METHOD__, $e->getMessage() );
184
			}
185
		}
186
187
		if ( !is_null( $params['show'] ) ) {
188
			$show = array_flip( $params['show'] );

includes/api/ApiQueryWatchlist.php 1 location

@@ 202-208 (lines=7) @@
199
			);
200
		}
201
202
		if ( !is_null( $params['type'] ) ) {
203
			try {
204
				$this->addWhereFld( 'rc_type', RecentChange::parseToRCType( $params['type'] ) );
205
			} catch ( Exception $e ) {
206
				ApiBase::dieDebug( __METHOD__, $e->getMessage() );
207
			}
208
		}
209
210
		if ( !is_null( $params['user'] ) && !is_null( $params['excludeuser'] ) ) {
211
			$this->dieUsage( 'user and excludeuser cannot be used together', 'user-excludeuser' );