Code Duplication    Length = 8-8 lines in 2 locations

includes/admin/EDD_SL_Plugin_Updater.php 2 locations

@@ 303-310 (lines=8) @@
300
		}
301
302
		// Convert sections into an associative array, since we're getting an object, but Core expects an array.
303
		if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
304
			$new_sections = array();
305
			foreach ( $_data->sections as $key => $value ) {
306
				$new_sections[ $key ] = $value;
307
			}
308
309
			$_data->sections = $new_sections;
310
		}
311
312
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
313
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
@@ 313-320 (lines=8) @@
310
		}
311
312
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
313
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
314
			$new_banners = array();
315
			foreach ( $_data->banners as $key => $value ) {
316
				$new_banners[ $key ] = $value;
317
			}
318
319
			$_data->banners = $new_banners;
320
		}
321
322
		return $_data;
323
	}