Code Duplication    Length = 5-5 lines in 2 locations

maintenance/importImages.php 1 location

@@ 252-256 (lines=5) @@
249
			$flags = 0;
250
			$publishOptions = [];
251
			$handler = MediaHandler::getHandler( $props['mime'] );
252
			if ( $handler ) {
253
				$publishOptions['headers'] = $handler->getStreamHeaders( $props['metadata'] );
254
			} else {
255
				$publishOptions['headers'] = [];
256
			}
257
			$archive = $image->publish( $file, $flags, $publishOptions );
258
			if ( !$archive->isGood() ) {
259
				echo "failed. (" .

includes/filerepo/file/LocalFile.php 1 location

@@ 1191-1195 (lines=5) @@
1188
1189
		$options = [];
1190
		$handler = MediaHandler::getHandler( $props['mime'] );
1191
		if ( $handler ) {
1192
			$options['headers'] = $handler->getStreamHeaders( $props['metadata'] );
1193
		} else {
1194
			$options['headers'] = [];
1195
		}
1196
1197
		// Trim spaces on user supplied text
1198
		$comment = trim( $comment );