Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 2 locations

@@ 217-221 (lines=5) @@
214
215
		$this->required_scope = $args['required_scope'];
216
217
		if ( $this->request_format ) {
218
			$this->request_format = array_filter( array_merge( $this->request_format, $args['request_format'] ) );
219
		} else {
220
			$this->request_format = $args['request_format'];
221
		}
222
223
		if ( $this->response_format ) {
224
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
@@ 223-227 (lines=5) @@
220
			$this->request_format = $args['request_format'];
221
		}
222
223
		if ( $this->response_format ) {
224
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
225
		} else {
226
			$this->response_format = $args['response_format'];
227
		}
228
229
		if ( false === $args['query_parameters'] ) {
230
			$this->query = array();