Code Duplication    Length = 4-9 lines in 2 locations

modules/related-posts/jetpack-related-posts.php 1 location

@@ 1252-1260 (lines=9) @@
1249
				}
1250
			}
1251
1252
			if ( !empty( $img_url ) ) {
1253
				$image_params['width'] = $thumbnail_size['width'];
1254
				$image_params['height'] = $thumbnail_size['height'];
1255
				$image_params['src'] = Jetpack_PostImages::fit_image_url(
1256
					$img_url,
1257
					$thumbnail_size['width'],
1258
					$thumbnail_size['height']
1259
				);
1260
			}
1261
		}
1262
1263
		return $image_params;

class.jetpack-post-images.php 1 location

@@ 587-590 (lines=4) @@
584
		if ( !$media && $args['from_attachment'] )
585
			$media = self::from_attachment( $post_id, $args['width'], $args['height'] );
586
		if ( !$media && $args['from_html'] ) {
587
			if ( empty( $args['html_content'] ) )
588
				$media = self::from_html( $post_id, $args['width'], $args['height'] ); // Use the post_id, which will load the content
589
			else
590
				$media = self::from_html( $args['html_content'], $args['width'], $args['height'] ); // If html_content is provided, use that
591
		}
592
593
		if ( !$media && $args['fallback_to_avatars'] ) {