Code Duplication    Length = 10-11 lines in 2 locations

packages/sync/Module_Posts.php 2 locations

@@ 178-187 (lines=10) @@
175
176
		// return non existant post
177
		$post_type = get_post_type_object( $post->post_type );
178
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
179
			$non_existant_post                    = new stdClass();
180
			$non_existant_post->ID                = $post->ID;
181
			$non_existant_post->post_modified     = $post->post_modified;
182
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
183
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
184
			$non_existant_post->post_type         = $post->post_type;
185
186
			return $non_existant_post;
187
		}
188
		/**
189
		 * Filters whether to prevent sending post data to .com
190
		 *
@@ 202-212 (lines=11) @@
199
		 * @param boolean false prevent post data from being synced to WordPress.com
200
		 * @param mixed $post WP_POST object
201
		 */
202
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
203
			// We only send the bare necessary object to be able to create a checksum.
204
			$blocked_post                    = new stdClass();
205
			$blocked_post->ID                = $post->ID;
206
			$blocked_post->post_modified     = $post->post_modified;
207
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
208
			$blocked_post->post_status       = 'jetpack_sync_blocked';
209
			$blocked_post->post_type         = $post->post_type;
210
211
			return $blocked_post;
212
		}
213
214
		// lets not do oembed just yet.
215
		$this->remove_embed();