Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 242-246 (lines=5) @@
239
				$inserted_images[] = site_url( '/' ) . $src['path'];
240
			}
241
		}
242
		foreach ( $images as $i => $image ) {
243
			if ( ! in_array( $image['src'], $inserted_images, true ) ) {
244
				unset( $images[ $i ] );
245
			}
246
		}
247
248
		return $images;
249
	}

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

@@ 234-238 (lines=5) @@
231
				$inserted_images[] = site_url( '/' ) . $src['path'];
232
			}
233
		}
234
		foreach ( $images as $i => $image ) {
235
			if ( ! in_array( $image['src'], $inserted_images ) ) {
236
				unset( $images[ $i ] );
237
			}
238
		}
239
240
		return $images;
241
	}