Code Duplication    Length = 8-8 lines in 2 locations

includes/admin/EDD_SL_Plugin_Updater.php 2 locations

@@ 330-337 (lines=8) @@
327
		}
328
329
		// Convert sections into an associative array, since we're getting an object, but Core expects an array.
330
		if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
331
			$new_sections = array();
332
			foreach ( $_data->sections as $key => $value ) {
333
				$new_sections[ $key ] = $value;
334
			}
335
336
			$_data->sections = $new_sections;
337
		}
338
339
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
340
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
@@ 340-347 (lines=8) @@
337
		}
338
339
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
340
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
341
			$new_banners = array();
342
			foreach ( $_data->banners as $key => $value ) {
343
				$new_banners[ $key ] = $value;
344
			}
345
346
			$_data->banners = $new_banners;
347
		}
348
349
		return $_data;
350
	}