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

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