Code Duplication    Length = 46-46 lines in 2 locations

view/SSTemplateParser.php 2 locations

@@ 2298-2343 (lines=46) @@
2295
			$res_365 = $result;
2296
			$pos_365 = $this->pos;
2297
			$_364 = NULL;
2298
			do {
2299
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2300
				$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" ); 
2301
				$_360 = NULL;
2302
				do {
2303
					$_358 = NULL;
2304
					do {
2305
						$res_355 = $result;
2306
						$pos_355 = $this->pos;
2307
						if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
2308
							$result["text"] .= $subres;
2309
							$_358 = TRUE; break;
2310
						}
2311
						$result = $res_355;
2312
						$this->pos = $pos_355;
2313
						if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
2314
							$result["text"] .= $subres;
2315
							$_358 = TRUE; break;
2316
						}
2317
						$result = $res_355;
2318
						$this->pos = $pos_355;
2319
						$_358 = FALSE; break;
2320
					}
2321
					while(0);
2322
					if( $_358 === FALSE) { $_360 = FALSE; break; }
2323
					$_360 = TRUE; break;
2324
				}
2325
				while(0);
2326
				if( $_360 === TRUE ) {
2327
					$subres = $result; $result = array_pop($stack);
2328
					$this->store( $result, $subres, 'Conditional' );
2329
				}
2330
				if( $_360 === FALSE) {
2331
					$result = array_pop($stack);
2332
					$_364 = FALSE; break;
2333
				}
2334
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2335
				$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
2336
				$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2337
				if ($subres !== FALSE) {
2338
					$this->store( $result, $subres, "Condition" );
2339
				}
2340
				else { $_364 = FALSE; break; }
2341
				$_364 = TRUE; break;
2342
			}
2343
			while(0);
2344
			if( $_364 === FALSE) {
2345
				$result = $res_365;
2346
				$this->pos = $pos_365;
@@ 2758-2803 (lines=46) @@
2755
			$res_462 = $result;
2756
			$pos_462 = $this->pos;
2757
			$_461 = NULL;
2758
			do {
2759
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2760
				$stack[] = $result; $result = $this->construct( $matchrule, "Conditional" ); 
2761
				$_457 = NULL;
2762
				do {
2763
					$_455 = NULL;
2764
					do {
2765
						$res_452 = $result;
2766
						$pos_452 = $this->pos;
2767
						if (( $subres = $this->literal( 'if' ) ) !== FALSE) {
2768
							$result["text"] .= $subres;
2769
							$_455 = TRUE; break;
2770
						}
2771
						$result = $res_452;
2772
						$this->pos = $pos_452;
2773
						if (( $subres = $this->literal( 'unless' ) ) !== FALSE) {
2774
							$result["text"] .= $subres;
2775
							$_455 = TRUE; break;
2776
						}
2777
						$result = $res_452;
2778
						$this->pos = $pos_452;
2779
						$_455 = FALSE; break;
2780
					}
2781
					while(0);
2782
					if( $_455 === FALSE) { $_457 = FALSE; break; }
2783
					$_457 = TRUE; break;
2784
				}
2785
				while(0);
2786
				if( $_457 === TRUE ) {
2787
					$subres = $result; $result = array_pop($stack);
2788
					$this->store( $result, $subres, 'Conditional' );
2789
				}
2790
				if( $_457 === FALSE) {
2791
					$result = array_pop($stack);
2792
					$_461 = FALSE; break;
2793
				}
2794
				if (( $subres = $this->whitespace(  ) ) !== FALSE) { $result["text"] .= $subres; }
2795
				$matcher = 'match_'.'IfArgument'; $key = $matcher; $pos = $this->pos;
2796
				$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
2797
				if ($subres !== FALSE) {
2798
					$this->store( $result, $subres, "Condition" );
2799
				}
2800
				else { $_461 = FALSE; break; }
2801
				$_461 = TRUE; break;
2802
			}
2803
			while(0);
2804
			if( $_461 === FALSE) {
2805
				$result = $res_462;
2806
				$this->pos = $pos_462;