Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 155-163 (lines=9) @@
152
153
		// return non existant post 
154
		$post_type = get_post_type_object( $post->post_type );
155
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
156
			$non_existant_post                    = new stdClass();
157
			$non_existant_post->ID                = $post->ID;
158
			$non_existant_post->post_modified     = $post->post_modified;
159
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
160
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
161
162
			return $non_existant_post;
163
		}
164
		/**
165
		 * Filters whether to prevent sending post data to .com
166
		 *
@@ 177-186 (lines=10) @@
174
		 * @param boolean false prevent post data from being synced to WordPress.com
175
		 * @param mixed $post WP_POST object
176
		 */
177
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
178
			// We only send the bare necessary object to be able to create a checksum.
179
			$blocked_post                    = new stdClass();
180
			$blocked_post->ID                = $post->ID;
181
			$blocked_post->post_modified     = $post->post_modified;
182
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
183
			$blocked_post->post_status       = 'jetpack_sync_blocked';
184
185
			return $blocked_post;
186
		}
187
188
		// lets not do oembed just yet.
189
		$this->remove_embed();