Code Duplication    Length = 3-3 lines in 2 locations

plugin.php 2 locations

@@ 287-289 (lines=3) @@
284
	function rest_validate_request_arg( $value, $request, $param ) {
285
286
		$attributes = $request->get_attributes();
287
		if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
288
			return true;
289
		}
290
		$args = $attributes['args'][ $param ];
291
292
		if ( ! empty( $args['enum'] ) ) {
@@ 381-383 (lines=3) @@
378
	function rest_sanitize_request_arg( $value, $request, $param ) {
379
380
		$attributes = $request->get_attributes();
381
		if ( ! isset( $attributes['args'][ $param ] ) || ! is_array( $attributes['args'][ $param ] ) ) {
382
			return $value;
383
		}
384
		$args = $attributes['args'][ $param ];
385
386
		if ( 'integer' === $args['type'] ) {