Code Duplication    Length = 6-6 lines in 2 locations

projects/plugins/jetpack/_inc/lib/class-jetpack-tweetstorm-helper.php 2 locations

@@ 1194-1199 (lines=6) @@
1191
	 * @return string The tweet URL. Empty string if there is none available.
1192
	 */
1193
	private static function extract_tweet_from_block( $block ) {
1194
		if (
1195
			'core/embed' === $block['blockName']
1196
			&& ( isset( $block['attrs']['providerNameSlug'] ) && 'twitter' === $block['attrs']['providerNameSlug'] )
1197
		) {
1198
			return $block['attrs']['url'];
1199
		}
1200
1201
		return '';
1202
	}
@@ 1218-1223 (lines=6) @@
1215
		}
1216
1217
		// Twitter embeds are handled in ::extract_tweet_from_block().
1218
		if (
1219
			'core/embed' === $block['blockName']
1220
			&& ( isset( $block['attrs']['providerNameSlug'] ) && 'twitter' === $block['attrs']['providerNameSlug'] )
1221
		) {
1222
			return '';
1223
		}
1224
1225
		$url = '';
1226
		if ( 'block-attributes' === $block_def['content_location'] ) {