Code Duplication    Length = 4-6 lines in 2 locations

classes/models/FrmForm.php 2 locations

@@ 570-573 (lines=4) @@
567
568
        $results = FrmDb::get_row( $table_name, $where );
569
570
		if ( isset( $results->options ) ) {
571
			FrmDb::set_cache( $results->id, $results, 'frm_form' );
572
			$results->options = maybe_unserialize( $results->options );
573
        }
574
		return stripslashes_deep( $results );
575
    }
576
@@ 596-601 (lines=6) @@
593
			$results = $wpdb->get_results( $query ); // WPCS: unprepared SQL ok.
594
		}
595
596
		if ( $results ) {
597
			foreach ( $results as $result ) {
598
				FrmDb::set_cache( $result->id, $result, 'frm_form' );
599
				$result->options = maybe_unserialize( $result->options );
600
			}
601
		}
602
603
		if ( $limit == ' LIMIT 1' || $limit == 1 ) {
604
			// return the first form object if we are only getting one form