Code Duplication    Length = 46-46 lines in 2 locations

view/SSTemplateParser.php 2 locations

@@ 2286-2331 (lines=46) @@
2283
			$res_364 = $result;
2284
			$pos_364 = $this->pos;
2285
			$_363 = NULL;
2286
			do {
2287
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2288
				$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
2289
				$_359 = NULL;
2290
				do {
2291
					$_357 = NULL;
2292
					do {
2293
						$res_354 = $result;
2294
						$pos_354 = $this->pos;
2295
						if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
2296
							$result["text"] .= $subres;
2297
							$_357 = TRUE; break;
2298
						}
2299
						$result = $res_354;
2300
						$this->pos = $pos_354;
2301
						if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
2302
							$result["text"] .= $subres;
2303
							$_357 = TRUE; break;
2304
						}
2305
						$result = $res_354;
2306
						$this->pos = $pos_354;
2307
						$_357 = FALSE; break;
2308
					}
2309
					while(0);
2310
					if( $_357 === FALSE) { $_359 = FALSE; break; }
2311
					$_359 = TRUE; break;
2312
				}
2313
				while(0);
2314
				if( $_359 === TRUE ) {
2315
					$subres = $result; $result = array_pop($stack);
2316
					$this->store( $result, $subres, 'Conditional' );
2317
				}
2318
				if( $_359 === FALSE) {
2319
					$result = array_pop($stack);
2320
					$_363 = FALSE; break;
2321
				}
2322
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2323
				$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
2324
				$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2325
				if ($subres !== FALSE) {
2326
					$this->store( $result, $subres, "Condition" );
2327
				}
2328
				else { $_363 = FALSE; break; }
2329
				$_363 = TRUE; break;
2330
			}
2331
			while(0);
2332
			if( $_363 === FALSE) {
2333
				$result = $res_364;
2334
				$this->pos = $pos_364;
@@ 2746-2791 (lines=46) @@
2743
			$res_461 = $result;
2744
			$pos_461 = $this->pos;
2745
			$_460 = NULL;
2746
			do {
2747
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2748
				$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" );
2749
				$_456 = NULL;
2750
				do {
2751
					$_454 = NULL;
2752
					do {
2753
						$res_451 = $result;
2754
						$pos_451 = $this->pos;
2755
						if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
2756
							$result["text"] .= $subres;
2757
							$_454 = TRUE; break;
2758
						}
2759
						$result = $res_451;
2760
						$this->pos = $pos_451;
2761
						if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
2762
							$result["text"] .= $subres;
2763
							$_454 = TRUE; break;
2764
						}
2765
						$result = $res_451;
2766
						$this->pos = $pos_451;
2767
						$_454 = FALSE; break;
2768
					}
2769
					while(0);
2770
					if( $_454 === FALSE) { $_456 = FALSE; break; }
2771
					$_456 = TRUE; break;
2772
				}
2773
				while(0);
2774
				if( $_456 === TRUE ) {
2775
					$subres = $result; $result = array_pop($stack);
2776
					$this->store( $result, $subres, 'Conditional' );
2777
				}
2778
				if( $_456 === FALSE) {
2779
					$result = array_pop($stack);
2780
					$_460 = FALSE; break;
2781
				}
2782
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2783
				$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
2784
				$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2785
				if ($subres !== FALSE) {
2786
					$this->store( $result, $subres, "Condition" );
2787
				}
2788
				else { $_460 = FALSE; break; }
2789
				$_460 = TRUE; break;
2790
			}
2791
			while(0);
2792
			if( $_460 === FALSE) {
2793
				$result = $res_461;
2794
				$this->pos = $pos_461;