Code Duplication    Length = 3-3 lines in 2 locations

modules/amp/includes/embeds/class-amp-twitter-embed.php 1 location

@@ 35-37 (lines=3) @@
32
			'tweet' => false,
33
		) );
34
35
		if ( empty( $attr['tweet'] ) && ! empty( $attr[0] ) ) {
36
			$attr['tweet'] = $attr[0];
37
		}
38
39
		$id = false;
40
		if ( is_numeric( $attr['tweet'] ) ) {

modules/shortcodes/tweet.php 1 location

@@ 51-53 (lines=3) @@
48
		// figure out the tweet id for the requested tweet
49
		// supporting both omitted attributes and tweet="tweet_id"
50
		// and supporting both an id and a URL
51
		if ( empty( $attr['tweet'] ) && ! empty( $atts[0] ) ) {
52
			$attr['tweet'] = $atts[0];
53
		}
54
55
		if ( ctype_digit( $attr['tweet'] ) ) {
56
			$id = 'https://twitter.com/jetpack/status/' . $attr['tweet'];