Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 2 locations

@@ 175-179 (lines=5) @@
172
173
		$this->required_scope = $args['required_scope'];
174
175
		if ( $this->request_format ) {
176
			$this->request_format = array_filter( array_merge( $this->request_format, $args['request_format'] ) );
177
		} else {
178
			$this->request_format = $args['request_format'];
179
		}
180
181
		if ( $this->response_format ) {
182
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
@@ 181-185 (lines=5) @@
178
			$this->request_format = $args['request_format'];
179
		}
180
181
		if ( $this->response_format ) {
182
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
183
		} else {
184
			$this->response_format = $args['response_format'];
185
		}
186
187
		if ( false === $args['query_parameters'] ) {
188
			$this->query = array();