Code Duplication    Length = 5-7 lines in 2 locations

classes/helpers/FrmFormsHelper.php 1 location

@@ 509-513 (lines=5) @@
506
		} else if ( is_object( $form ) && $form->parent_form_id ) {
507
			// get the parent form if this is a child
508
			$form = $form->parent_form_id;
509
		} else if ( is_array( $form ) && isset( $form['parent_form_id'] ) && $form['parent_form_id'] ) {
510
			$form = $form['parent_form_id'];
511
		} else if ( is_array( $form ) && isset( $form['custom_style'] ) ) {
512
			$style = $form['custom_style'];
513
		}
514
515
		if ( $form && is_string( $form ) ) {
516
			$form = FrmForm::getOne( $form );

classes/helpers/FrmFieldsHelper.php 1 location

@@ 893-899 (lines=7) @@
890
                $replace_with = wpautop($replace_with);
891
            }
892
			unset( $autop );
893
		} else if ( is_array( $replace_with ) ) {
894
			if ( isset( $atts['show'] ) && $atts['show'] && isset( $replace_with[ $atts['show'] ] ) ) {
895
				$replace_with = $replace_with[ $atts['show'] ];
896
			} else {
897
				$replace_with = implode( $sep, $replace_with );
898
			}
899
		}
900
901
		return $replace_with;
902
	}