Code Duplication    Length = 4-6 lines in 2 locations

classes/models/FrmForm.php 2 locations

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