Code Duplication    Length = 7-8 lines in 2 locations

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

@@ 5624-5630 (lines=7) @@
5621
5622
			$tagnames = array();
5623
			$tags = wp_get_post_tags( $post_ID );
5624
			if ( !empty( $tags ) ) {
5625
				foreach ( $tags as $tag )
5626
					$tagnames[] = $tag->name;
5627
				$tagnames = implode( ', ', $tagnames );
5628
			} else {
5629
				$tagnames = '';
5630
			}
5631
5632
			$post = get_extended($postdata['post_content']);
5633
			$link = get_permalink($postdata['ID']);
@@ 5763-5770 (lines=8) @@
5760
5761
			$tagnames = array();
5762
			$tags = wp_get_post_tags( $entry['ID'] );
5763
			if ( !empty( $tags ) ) {
5764
				foreach ( $tags as $tag ) {
5765
					$tagnames[] = $tag->name;
5766
				}
5767
				$tagnames = implode( ', ', $tagnames );
5768
			} else {
5769
				$tagnames = '';
5770
			}
5771
5772
			$post = get_extended($entry['post_content']);
5773
			$link = get_permalink($entry['ID']);