Code Duplication    Length = 4-4 lines in 2 locations

src/DB/Table.php 2 locations

@@ 203-206 (lines=4) @@
200
		}
201
		// Validate the operator.
202
		$valid_operator = in_array( $operator, array_keys( $this->operators ), true );
203
		if ( ! $valid_operator ) {
204
			// translators: Error message shown when a filter is passed an invalid operator.
205
			$msg = __( '"%s" is not a valid operator.', 'tabulate' );
206
			throw new Exception( sprintf( $msg, $operator ) );
207
		}
208
		// Validate the value.
209
		$empty_value_allowed = ( strpos( $operator, 'empty' ) === false && ! empty( $value ) );
@@ 211-214 (lines=4) @@
208
		// Validate the value.
209
		$empty_value_allowed = ( strpos( $operator, 'empty' ) === false && ! empty( $value ) );
210
		$valid_value = (strpos( $operator, 'empty' ) !== false) || $empty_value_allowed;
211
		if ( ! $valid_operator ) {
212
			// translators: Error message shown when a filter is passed an invalid value.
213
			$msg = __( '"%s" is not a valid value.', 'tabulate' );
214
			throw new Exception( sprintf( $msg, $value ) );
215
		}
216
		// Save the filter for later application (see Table::apply_filters()).
217
		if ( $valid_columm && $valid_operator && $valid_value ) {