Code Duplication    Length = 7-10 lines in 3 locations

modules/shortcodes/recipe.php 3 locations

@@ 190-196 (lines=7) @@
187
		) {
188
			$html .= '<ul class="jetpack-recipe-meta">';
189
190
			if ( '' !== $atts['servings'] ) {
191
				$html .= sprintf(
192
					'<li class="jetpack-recipe-servings p-yield yield" itemprop="recipeYield"><strong>%1$s: </strong>%2$s</li>',
193
					esc_html_x( 'Servings', 'recipe', 'jetpack' ),
194
					esc_html( $atts['servings'] )
195
				);
196
			}
197
198
			$time_types = array( 'cooktime', 'preptime', 'time' );
199
			foreach ( $time_types as $time_type ) {
@@ 206-212 (lines=7) @@
203
				$html .= self::output_time( $atts[ $time_type ], $time_type );
204
			}
205
206
			if ( '' !== $atts['difficulty'] ) {
207
				$html .= sprintf(
208
					'<li class="jetpack-recipe-difficulty"><strong>%1$s: </strong>%2$s</li>',
209
					esc_html_x( 'Difficulty', 'recipe', 'jetpack' ),
210
					esc_html( $atts['difficulty'] )
211
				);
212
			}
213
214
			if ( '' !== $atts['rating'] ) {
215
				$html .= sprintf(
@@ 214-223 (lines=10) @@
211
				);
212
			}
213
214
			if ( '' !== $atts['rating'] ) {
215
				$html .= sprintf(
216
					'<li class="jetpack-recipe-rating">
217
						<strong>%1$s: </strong>
218
						<span itemprop="contentRating">%2$s</span>
219
					</li>',
220
					esc_html_x( 'Rating', 'recipe', 'jetpack' ),
221
					esc_html( $atts['rating'] )
222
				);
223
			}
224
225
			if ( '' !== $atts['source'] ) {
226
				$html .= sprintf(