Code Duplication    Length = 9-10 lines in 2 locations

sync/class.jetpack-sync-module-posts.php 2 locations

@@ 215-223 (lines=9) @@
212
213
		// return non existant post 
214
		$post_type = get_post_type_object( $post->post_type );
215
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
216
			$non_existant_post                    = new stdClass();
217
			$non_existant_post->ID                = $post->ID;
218
			$non_existant_post->post_modified     = $post->post_modified;
219
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
220
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
221
222
			return $non_existant_post;
223
		}
224
		/**
225
		 * Filters whether to prevent sending post data to .com
226
		 *
@@ 237-246 (lines=10) @@
234
		 * @param boolean false prevent post data from being synced to WordPress.com
235
		 * @param mixed $post WP_POST object
236
		 */
237
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
238
			// We only send the bare necessary object to be able to create a checksum.
239
			$blocked_post                    = new stdClass();
240
			$blocked_post->ID                = $post->ID;
241
			$blocked_post->post_modified     = $post->post_modified;
242
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
243
			$blocked_post->post_status       = 'jetpack_sync_blocked';
244
245
			return $blocked_post;
246
		}
247
248
		// lets not do oembed just yet.
249
		$this->remove_embed();