Code Duplication    Length = 16-18 lines in 2 locations

includes/parser/Parser.php 2 locations

@@ 1708-1723 (lines=16) @@
1705
			} else {
1706
				$thislen = strlen( $r );
1707
				if ( $thislen == 2 ) {
1708
					if ( $state === 'i' ) {
1709
						$output .= '</i>';
1710
						$state = '';
1711
					} elseif ( $state === 'bi' ) {
1712
						$output .= '</i>';
1713
						$state = 'b';
1714
					} elseif ( $state === 'ib' ) {
1715
						$output .= '</b></i><b>';
1716
						$state = 'b';
1717
					} elseif ( $state === 'both' ) {
1718
						$output .= '<b><i>' . $buffer . '</i>';
1719
						$state = 'b';
1720
					} else { // $state can be 'b' or ''
1721
						$output .= '<i>';
1722
						$state .= 'i';
1723
					}
1724
				} elseif ( $thislen == 3 ) {
1725
					if ( $state === 'b' ) {
1726
						$output .= '</b>';
@@ 1724-1741 (lines=18) @@
1721
						$output .= '<i>';
1722
						$state .= 'i';
1723
					}
1724
				} elseif ( $thislen == 3 ) {
1725
					if ( $state === 'b' ) {
1726
						$output .= '</b>';
1727
						$state = '';
1728
					} elseif ( $state === 'bi' ) {
1729
						$output .= '</i></b><i>';
1730
						$state = 'i';
1731
					} elseif ( $state === 'ib' ) {
1732
						$output .= '</b>';
1733
						$state = 'i';
1734
					} elseif ( $state === 'both' ) {
1735
						$output .= '<i><b>' . $buffer . '</b>';
1736
						$state = 'i';
1737
					} else { // $state can be 'i' or ''
1738
						$output .= '<b>';
1739
						$state .= 'b';
1740
					}
1741
				} elseif ( $thislen == 5 ) {
1742
					if ( $state === 'b' ) {
1743
						$output .= '</b><i>';
1744
						$state = 'i';