Code Duplication    Length = 6-7 lines in 2 locations

core/Field/Set_Field.php 1 location

@@ 57-63 (lines=7) @@
54
	public function set_value_from_input( $input ) {
55
		if ( ! isset( $input[ $this->name ] ) ) {
56
			$this->set_value( array() );
57
		} else {
58
			$value = stripslashes_deep( $input[ $this->name ] );
59
			if ( is_array( $value ) ) {
60
				$value = array_values( $value );
61
			}
62
			$this->set_value( $value );
63
		}
64
	}
65
66
	/**

core/Field/Association_Field.php 1 location

@@ 83-88 (lines=6) @@
80
	 */
81
	public function set_value_from_input( $input ) {
82
		$value = array();
83
		if ( isset( $input[ $this->get_name() ] ) ) {
84
			$value = stripslashes_deep( $input[ $this->get_name() ] );
85
			if ( is_array( $value ) ) {
86
				$value = array_values( $value );
87
			}
88
		}
89
		$this->set_value( $value );
90
	}
91