Code Duplication    Length = 9-10 lines in 2 locations

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

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