Code Duplication    Length = 5-5 lines in 2 locations

maintenance/importImages.php 1 location

@@ 246-250 (lines=5) @@
243
			$flags = 0;
244
			$publishOptions = [];
245
			$handler = MediaHandler::getHandler( $props['mime'] );
246
			if ( $handler ) {
247
				$publishOptions['headers'] = $handler->getStreamHeaders( $props['metadata'] );
248
			} else {
249
				$publishOptions['headers'] = [];
250
			}
251
			$archive = $image->publish( $file, $flags, $publishOptions );
252
			if ( !$archive->isGood() ) {
253
				echo "failed. (" .

includes/filerepo/file/LocalFile.php 1 location

@@ 1149-1153 (lines=5) @@
1146
1147
		$options = [];
1148
		$handler = MediaHandler::getHandler( $props['mime'] );
1149
		if ( $handler ) {
1150
			$options['headers'] = $handler->getStreamHeaders( $props['metadata'] );
1151
		} else {
1152
			$options['headers'] = [];
1153
		}
1154
1155
		// Trim spaces on user supplied text
1156
		$comment = trim( $comment );