Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 146-154 (lines=9) @@
143
144
		// return non existant post 
145
		$post_type = get_post_type_object( $post->post_type );
146
		if ( empty( $post_type) || ! is_object( $post_type ) ) {
147
			$non_existant_post                    = new stdClass();
148
			$non_existant_post->ID                = $post->ID;
149
			$non_existant_post->post_modified     = $post->post_modified;
150
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
151
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
152
			
153
			return $non_existant_post;
154
		}
155
		/**
156
		 * Filters whether to prevent sending post data to .com
157
		 *
@@ 168-177 (lines=10) @@
165
		 * @param boolean false prevent post data from being synced to WordPress.com
166
		 * @param mixed $post WP_POST object
167
		 */
168
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
169
			// We only send the bare necessary object to be able to create a checksum.
170
			$blocked_post                    = new stdClass();
171
			$blocked_post->ID                = $post->ID;
172
			$blocked_post->post_modified     = $post->post_modified;
173
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
174
			$blocked_post->post_status       = 'jetpack_sync_blocked';
175
176
			return $blocked_post;
177
		}
178
179
		// lets not do oembed just yet.
180
		$this->remove_embed();