Code Duplication    Length = 7-8 lines in 2 locations

wp-includes/class-wp-xmlrpc-server.php 2 locations

@@ 5509-5515 (lines=7) @@
5506
5507
			$tagnames = array();
5508
			$tags = wp_get_post_tags( $post_ID );
5509
			if ( !empty( $tags ) ) {
5510
				foreach ( $tags as $tag )
5511
					$tagnames[] = $tag->name;
5512
				$tagnames = implode( ', ', $tagnames );
5513
			} else {
5514
				$tagnames = '';
5515
			}
5516
5517
			$post = get_extended($postdata['post_content']);
5518
			$link = get_permalink($postdata['ID']);
@@ 5648-5655 (lines=8) @@
5645
5646
			$tagnames = array();
5647
			$tags = wp_get_post_tags( $entry['ID'] );
5648
			if ( !empty( $tags ) ) {
5649
				foreach ( $tags as $tag ) {
5650
					$tagnames[] = $tag->name;
5651
				}
5652
				$tagnames = implode( ', ', $tagnames );
5653
			} else {
5654
				$tagnames = '';
5655
			}
5656
5657
			$post = get_extended($entry['post_content']);
5658
			$link = get_permalink($entry['ID']);