Code Duplication    Length = 7-10 lines in 3 locations

projects/plugins/jetpack/modules/shortcodes/recipe.php 3 locations

@@ 205-211 (lines=7) @@
202
		) {
203
			$html .= '<ul class="jetpack-recipe-meta">';
204
205
			if ( '' !== $atts['servings'] ) {
206
				$html .= sprintf(
207
					'<li class="jetpack-recipe-servings p-yield yield" itemprop="recipeYield"><strong>%1$s: </strong>%2$s</li>',
208
					esc_html_x( 'Servings', 'recipe', 'jetpack' ),
209
					esc_html( $atts['servings'] )
210
				);
211
			}
212
213
			$time_types = array( 'preptime', 'cooktime', 'time' );
214
			foreach ( $time_types as $time_type ) {
@@ 221-227 (lines=7) @@
218
				$html .= self::output_time( $atts[ $time_type ], $time_type );
219
			}
220
221
			if ( '' !== $atts['difficulty'] ) {
222
				$html .= sprintf(
223
					'<li class="jetpack-recipe-difficulty"><strong>%1$s: </strong>%2$s</li>',
224
					esc_html_x( 'Difficulty', 'recipe', 'jetpack' ),
225
					esc_html( $atts['difficulty'] )
226
				);
227
			}
228
229
			if ( '' !== $atts['rating'] ) {
230
				$html .= sprintf(
@@ 229-238 (lines=10) @@
226
				);
227
			}
228
229
			if ( '' !== $atts['rating'] ) {
230
				$html .= sprintf(
231
					'<li class="jetpack-recipe-rating">
232
						<strong>%1$s: </strong>
233
						<span itemprop="contentRating">%2$s</span>
234
					</li>',
235
					esc_html_x( 'Rating', 'recipe', 'jetpack' ),
236
					esc_html( $atts['rating'] )
237
				);
238
			}
239
240
			if ( '' !== $atts['source'] ) {
241
				$html .= sprintf(