Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 2 locations

@@ 195-199 (lines=5) @@
192
193
		$this->required_scope = $args['required_scope'];
194
195
		if ( $this->request_format ) {
196
			$this->request_format = array_filter( array_merge( $this->request_format, $args['request_format'] ) );
197
		} else {
198
			$this->request_format = $args['request_format'];
199
		}
200
201
		if ( $this->response_format ) {
202
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
@@ 201-205 (lines=5) @@
198
			$this->request_format = $args['request_format'];
199
		}
200
201
		if ( $this->response_format ) {
202
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
203
		} else {
204
			$this->response_format = $args['response_format'];
205
		}
206
207
		if ( false === $args['query_parameters'] ) {
208
			$this->query = array();