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

@@ 154-160 (lines=7) @@
151
			$options['filters'] = array_keys( $show );
152
		}
153
154
		if ( !is_null( $params['type'] ) ) {
155
			try {
156
				$options['rcTypes'] = RecentChange::parseToRCType( $params['type'] );
157
			} catch ( Exception $e ) {
158
				ApiBase::dieDebug( __METHOD__, $e->getMessage() );
159
			}
160
		}
161
162
		if ( !is_null( $params['user'] ) && !is_null( $params['excludeuser'] ) ) {
163
			$this->dieUsage( 'user and excludeuser cannot be used together', 'user-excludeuser' );