Code Duplication    Length = 14-14 lines in 2 locations

includes/resourceloader/ResourceLoaderModule.php 2 locations

@@ 237-250 (lines=14) @@
234
	 * @param ResourceLoaderContext $context
235
	 * @return array Array of URLs
236
	 */
237
	public function getScriptURLsForDebug( ResourceLoaderContext $context ) {
238
		$resourceLoader = $context->getResourceLoader();
239
		$derivative = new DerivativeResourceLoaderContext( $context );
240
		$derivative->setModules( [ $this->getName() ] );
241
		$derivative->setOnly( 'scripts' );
242
		$derivative->setDebug( true );
243
244
		$url = $resourceLoader->createLoaderURL(
245
			$this->getSource(),
246
			$derivative
247
		);
248
249
		return [ $url ];
250
	}
251
252
	/**
253
	 * Whether this module supports URL loading. If this function returns false,
@@ 284-297 (lines=14) @@
281
	 * @param ResourceLoaderContext $context
282
	 * @return array Array( mediaType => array( URL1, URL2, ... ), ... )
283
	 */
284
	public function getStyleURLsForDebug( ResourceLoaderContext $context ) {
285
		$resourceLoader = $context->getResourceLoader();
286
		$derivative = new DerivativeResourceLoaderContext( $context );
287
		$derivative->setModules( [ $this->getName() ] );
288
		$derivative->setOnly( 'styles' );
289
		$derivative->setDebug( true );
290
291
		$url = $resourceLoader->createLoaderURL(
292
			$this->getSource(),
293
			$derivative
294
		);
295
296
		return [ 'all' => [ $url ] ];
297
	}
298
299
	/**
300
	 * Get the messages needed for this module.