Code Duplication    Length = 8-8 lines in 3 locations

src/wp-admin/includes/class-wp-upgrader.php 3 locations

@@ 702-709 (lines=8) @@
699
700
		$this->skin->before();
701
702
		if ( is_wp_error($res) ) {
703
			$this->skin->error($res);
704
			$this->skin->after();
705
			if ( ! $options['is_multi'] ) {
706
				$this->skin->footer();
707
			}
708
			return $res;
709
		}
710
711
		/*
712
		 * Download the package (Note, This just returns the filename
@@ 716-723 (lines=8) @@
713
		 * of the file if the package is a local file)
714
		 */
715
		$download = $this->download_package( $options['package'] );
716
		if ( is_wp_error($download) ) {
717
			$this->skin->error($download);
718
			$this->skin->after();
719
			if ( ! $options['is_multi'] ) {
720
				$this->skin->footer();
721
			}
722
			return $download;
723
		}
724
725
		$delete_package = ( $download != $options['package'] ); // Do not delete a "local" file
726
@@ 729-736 (lines=8) @@
726
727
		// Unzips the file into a temporary directory.
728
		$working_dir = $this->unpack_package( $download, $delete_package );
729
		if ( is_wp_error($working_dir) ) {
730
			$this->skin->error($working_dir);
731
			$this->skin->after();
732
			if ( ! $options['is_multi'] ) {
733
				$this->skin->footer();
734
			}
735
			return $working_dir;
736
		}
737
738
		// With the given options, this installs it to the destination directory.
739
		$result = $this->install_package( array(