Code Duplication    Length = 4-4 lines in 2 locations

3rd-party/class.jetpack-amp-support.php 1 location

@@ 213-216 (lines=4) @@
210
				$image['src'] => false,
211
			) );
212
213
			if ( false !== $dimensions[ $image['src'] ] ) {
214
				$image['src_width']  = $dimensions['width'];
215
				$image['src_height'] = $dimensions['height'];
216
			}
217
		}
218
219
		$metadata['image'] = array(

functions.opengraph.php 1 location

@@ 293-296 (lines=4) @@
290
			if ( $post_images && ! is_wp_error( $post_images ) ) {
291
				foreach ( (array) $post_images as $post_image ) {
292
					$image['src'] = $post_image['src'];
293
					if ( isset( $post_image['src_width'], $post_image['src_height'] ) ) {
294
						$image['width']  = $post_image['src_width'];
295
						$image['height'] = $post_image['src_height'];
296
					}
297
				}
298
			}
299
		}