Code Duplication    Length = 8-8 lines in 2 locations

classes/models/FrmEDD_SL_Plugin_Updater.php 2 locations

@@ 187-194 (lines=8) @@
184
		}
185
186
		// Convert sections into an associative array, since we're getting an object, but Core expects an array.
187
		if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
188
			$new_sections = array();
189
			foreach ( $_data->sections as $key => $value ) {
190
				$new_sections[ $key ] = $value;
191
			}
192
193
			$_data->sections = $new_sections;
194
		}
195
196
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
197
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
@@ 197-204 (lines=8) @@
194
		}
195
196
		// Convert banners into an associative array, since we're getting an object, but Core expects an array.
197
		if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
198
			$new_banners = array();
199
			foreach ( $_data->banners as $key => $value ) {
200
				$new_banners[ $key ] = $value;
201
			}
202
203
			$_data->banners = $new_banners;
204
		}
205
206
		return $_data;
207
	}