Code Duplication    Length = 3-3 lines in 2 locations

json-endpoints/class.wpcom-json-api-update-post-v1-1-endpoint.php 1 location

@@ 619-621 (lines=3) @@
616
		if ( ! empty( $media_results['errors'] ) )
617
			$return['media_errors'] = $media_results['errors'];
618
619
		if ( 'publish' !== $post->post_status ) {
620
			$return['other_URLs'] = (object) $this->get_post_permalink_suggestions( $post_id, $input['title'] );
621
		}
622
623
		/** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
624
		do_action( 'wpcom_json_api_objects', 'posts' );

json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php 1 location

@@ 619-621 (lines=3) @@
616
		if ( ! empty( $media_results['errors'] ) )
617
			$return['media_errors'] = $media_results['errors'];
618
619
		if ( 'publish' !== $post->post_status && isset( $input['title'] )) {
620
			$return['other_URLs'] = (object) $this->get_post_permalink_suggestions( $post_id, $input['title'] );
621
		}
622
623
		/** This action is documented in json-endpoints/class.wpcom-json-api-site-settings-endpoint.php */
624
		do_action( 'wpcom_json_api_objects', 'posts' );