Code Duplication    Length = 5-5 lines in 2 locations

class.json-api-endpoints.php 2 locations

@@ 183-187 (lines=5) @@
180
181
		$this->required_scope = $args['required_scope'];
182
183
		if ( $this->request_format ) {
184
			$this->request_format = array_filter( array_merge( $this->request_format, $args['request_format'] ) );
185
		} else {
186
			$this->request_format = $args['request_format'];
187
		}
188
189
		if ( $this->response_format ) {
190
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
@@ 189-193 (lines=5) @@
186
			$this->request_format = $args['request_format'];
187
		}
188
189
		if ( $this->response_format ) {
190
			$this->response_format = array_filter( array_merge( $this->response_format, $args['response_format'] ) );
191
		} else {
192
			$this->response_format = $args['response_format'];
193
		}
194
195
		if ( false === $args['query_parameters'] ) {
196
			$this->query = array();