Code Duplication    Length = 3-3 lines in 2 locations

wp-includes/rest-api/class-wp-rest-request.php 2 locations

@@ 837-839 (lines=3) @@
834
			}
835
		}
836
837
		if ( ! empty( $required ) ) {
838
			return new WP_Error( 'rest_missing_callback_param', sprintf( __( 'Missing parameter(s): %s' ), implode( ', ', $required ) ), array( 'status' => 400, 'params' => $required ) );
839
		}
840
841
		/*
842
		 * Check the validation callbacks for each registered arg.
@@ 865-867 (lines=3) @@
862
			}
863
		}
864
865
		if ( $invalid_params ) {
866
			return new WP_Error( 'rest_invalid_param', sprintf( __( 'Invalid parameter(s): %s' ), implode( ', ', array_keys( $invalid_params ) ) ), array( 'status' => 400, 'params' => $invalid_params ) );
867
		}
868
869
		return true;
870