Code Duplication    Length = 5-5 lines in 2 locations

includes/htmlform/fields/HTMLCheckMatrix.php 1 location

@@ 65-69 (lines=5) @@
62
			}
63
		}
64
		$validValues = array_intersect( $value, $validOptions );
65
		if ( count( $validValues ) == count( $value ) ) {
66
			return true;
67
		} else {
68
			return $this->msg( 'htmlform-select-badoption' )->parse();
69
		}
70
	}
71
72
	/**

includes/htmlform/fields/HTMLMultiSelectField.php 1 location

@@ 46-50 (lines=5) @@
43
		$validOptions = HTMLFormField::flattenOptions( $this->getOptions() );
44
45
		$validValues = array_intersect( $value, $validOptions );
46
		if ( count( $validValues ) == count( $value ) ) {
47
			return true;
48
		} else {
49
			return $this->msg( 'htmlform-select-badoption' )->parse();
50
		}
51
	}
52
53
	public function getInputHTML( $value ) {