Code Duplication    Length = 5-6 lines in 2 locations

classes/models/FrmField.php 2 locations

@@ 271-275 (lines=5) @@
268
            return $results;
269
        }
270
271
        if ( is_numeric($id) ) {
272
            wp_cache_set( $results->field_key, $results, 'frm_field' );
273
        } else if ( $results ) {
274
            wp_cache_set( $results->id, $results, 'frm_field' );
275
        }
276
277
		self::prepare_options( $results );
278
@@ 489-494 (lines=6) @@
486
487
				unset( $r_key, $result );
488
			}
489
		} else if ( $results ) {
490
			wp_cache_set( $results->id, $results, 'frm_field' );
491
			wp_cache_set( $results->field_key, $results, 'frm_field' );
492
493
			self::prepare_options( $results );
494
		}
495
	}
496
497
	/**