Code Duplication    Length = 8-8 lines in 2 locations

projects/packages/post-images/src/class-post-images.php 1 location

@@ 599-606 (lines=8) @@
596
		do_action( 'jetpack_postimages_pre_get_image', $post_id );
597
		$media = self::get_images( $post_id, $args );
598
599
		if ( is_array( $media ) ) {
600
			foreach ( $media as $item ) {
601
				if ( 'image' === $item['type'] ) {
602
					$image = $item;
603
					break;
604
				}
605
			}
606
		}
607
608
		/**
609
		 * Fires after we find a single good image for a specific post.

projects/plugins/jetpack/class.jetpack-post-images.php 1 location

@@ 607-614 (lines=8) @@
604
		do_action( 'jetpack_postimages_pre_get_image', $post_id );
605
		$media = self::get_images( $post_id, $args );
606
607
		if ( is_array( $media ) ) {
608
			foreach ( $media as $item ) {
609
				if ( 'image' == $item['type'] ) {
610
					$image = $item;
611
					break;
612
				}
613
			}
614
		}
615
616
		/**
617
		 * Fires after we find a single good image for a specific post.