Code Duplication    Length = 3-3 lines in 2 locations

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

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

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

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