Code Duplication    Length = 3-3 lines in 2 locations

modules/amp/includes/embeds/class-amp-twitter-embed.php 2 locations

@@ 44-46 (lines=3) @@
41
			$id = $attr['tweet'];
42
		} else {
43
			preg_match( self::URL_PATTERN, $attr['tweet'], $matches );
44
			if ( isset( $matches[5] ) && is_numeric( $matches[5] ) ) {
45
				$id = $matches[5];
46
			}
47
48
			if ( empty( $id ) ) {
49
				return '';
@@ 69-71 (lines=3) @@
66
	function oembed( $matches, $attr, $url, $rawattr ) {
67
		$id = false;
68
69
		if ( isset( $matches[5] ) && is_numeric( $matches[5] ) ) {
70
			$id = $matches[5];
71
		}
72
73
		if ( ! $id ) {
74
			return '';