Code Duplication    Length = 5-5 lines in 2 locations

includes/htmlform/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/HTMLMultiSelectField.php 1 location

@@ 23-27 (lines=5) @@
20
		$validOptions = HTMLFormField::flattenOptions( $this->getOptions() );
21
22
		$validValues = array_intersect( $value, $validOptions );
23
		if ( count( $validValues ) == count( $value ) ) {
24
			return true;
25
		} else {
26
			return $this->msg( 'htmlform-select-badoption' )->parse();
27
		}
28
	}
29
30
	function getInputHTML( $value ) {