Code Duplication    Length = 5-5 lines in 2 locations

wp-admin/includes/file.php 2 locations

@@ 666-670 (lines=5) @@
663
	 * A disk that has zero free bytes has bigger problems.
664
	 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer.
665
	 */
666
	if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
667
		$available_space = @disk_free_space( WP_CONTENT_DIR );
668
		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
669
			return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) );
670
	}
671
672
	$needed_dirs = array_unique($needed_dirs);
673
	foreach ( $needed_dirs as $dir ) {
@@ 772-776 (lines=5) @@
769
	 * A disk that has zero free bytes has bigger problems.
770
	 * Require we have enough space to unzip the file and copy its contents, with a 10% buffer.
771
	 */
772
	if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
773
		$available_space = @disk_free_space( WP_CONTENT_DIR );
774
		if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space )
775
			return new WP_Error( 'disk_full_unzip_file', __( 'Could not copy files. You may have run out of disk space.' ), compact( 'uncompressed_size', 'available_space' ) );
776
	}
777
778
	$needed_dirs = array_unique($needed_dirs);
779
	foreach ( $needed_dirs as $dir ) {