Code Duplication    Length = 3-3 lines in 3 locations

core/helpers/EEH_Form_Fields.helper.php 3 locations

@@ 749-751 (lines=3) @@
746
	static function select( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $system_ID = FALSE, $use_html_entities = TRUE, $add_please_select_option = FALSE ) {
747
748
		// need these
749
		if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) {
750
			return NULL;
751
		}
752
		// prep the answer
753
		$answer = is_array( $answer ) ? self::prep_answer( array_shift( $answer ), $use_html_entities) : self::prep_answer( $answer, $use_html_entities );
754
		// prep the required array
@@ 855-857 (lines=3) @@
852
	 */
853
	static function radio( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $system_ID = FALSE, $use_html_entities = TRUE, $label_b4 = FALSE, $use_desc_4_label = FALSE ) {
854
		// need these
855
		if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) {
856
			return NULL;
857
		}
858
		// prep the answer
859
		$answer = is_array( $answer ) ? '' : self::prep_answer( $answer, $use_html_entities );
860
		// prep the required array
@@ 927-929 (lines=3) @@
924
	 */
925
	static function checkbox( $question = FALSE, $answer = NULL, $options = FALSE, $name = FALSE, $id = '', $class = '', $required = FALSE, $required_text = '', $label_class = '', $disabled = FALSE, $label_b4 = FALSE, $system_ID = FALSE, $use_html_entities = TRUE ) {
926
		// need these
927
		if ( ! $question || ! $name || ! $options || empty( $options ) || ! is_array( $options )) {
928
			return NULL;
929
		}
930
		$answer = maybe_unserialize( $answer );
931
932
		// prep the answer(s)