Code Duplication    Length = 16-18 lines in 2 locations

includes/parser/Parser.php 2 locations

@@ 1727-1742 (lines=16) @@
1724
			} else {
1725
				$thislen = strlen( $r );
1726
				if ( $thislen == 2 ) {
1727
					if ( $state === 'i' ) {
1728
						$output .= '</i>';
1729
						$state = '';
1730
					} elseif ( $state === 'bi' ) {
1731
						$output .= '</i>';
1732
						$state = 'b';
1733
					} elseif ( $state === 'ib' ) {
1734
						$output .= '</b></i><b>';
1735
						$state = 'b';
1736
					} elseif ( $state === 'both' ) {
1737
						$output .= '<b><i>' . $buffer . '</i>';
1738
						$state = 'b';
1739
					} else { // $state can be 'b' or ''
1740
						$output .= '<i>';
1741
						$state .= 'i';
1742
					}
1743
				} elseif ( $thislen == 3 ) {
1744
					if ( $state === 'b' ) {
1745
						$output .= '</b>';
@@ 1743-1760 (lines=18) @@
1740
						$output .= '<i>';
1741
						$state .= 'i';
1742
					}
1743
				} elseif ( $thislen == 3 ) {
1744
					if ( $state === 'b' ) {
1745
						$output .= '</b>';
1746
						$state = '';
1747
					} elseif ( $state === 'bi' ) {
1748
						$output .= '</i></b><i>';
1749
						$state = 'i';
1750
					} elseif ( $state === 'ib' ) {
1751
						$output .= '</b>';
1752
						$state = 'i';
1753
					} elseif ( $state === 'both' ) {
1754
						$output .= '<i><b>' . $buffer . '</b>';
1755
						$state = 'i';
1756
					} else { // $state can be 'i' or ''
1757
						$output .= '<b>';
1758
						$state .= 'b';
1759
					}
1760
				} elseif ( $thislen == 5 ) {
1761
					if ( $state === 'b' ) {
1762
						$output .= '</b><i>';
1763
						$state = 'i';