Code Duplication    Length = 28-28 lines in 4 locations

view/SSTemplateParser.php 4 locations

@@ 1026-1053 (lines=28) @@
1023
1024
	/* Injection: BracketInjection | SimpleInjection */
1025
	protected $match_Injection_typestack = array('Injection');
1026
	function match_Injection ($stack = array()) {
1027
		$matchrule = "Injection"; $result = $this->construct($matchrule, $matchrule, null);
1028
		$_136 = NULL;
1029
		do {
1030
			$res_133 = $result;
1031
			$pos_133 = $this->pos;
1032
			$matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos;
1033
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1034
			if ($subres !== FALSE) {
1035
				$this->store( $result, $subres );
1036
				$_136 = TRUE; break;
1037
			}
1038
			$result = $res_133;
1039
			$this->pos = $pos_133;
1040
			$matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos;
1041
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1042
			if ($subres !== FALSE) {
1043
				$this->store( $result, $subres );
1044
				$_136 = TRUE; break;
1045
			}
1046
			$result = $res_133;
1047
			$this->pos = $pos_133;
1048
			$_136 = FALSE; break;
1049
		}
1050
		while(0);
1051
		if( $_136 === TRUE ) { return $this->finalise($result); }
1052
		if( $_136 === FALSE) { return FALSE; }
1053
	}
1054
1055
1056
@@ 1487-1514 (lines=28) @@
1484
1485
	/* IfArgumentPortion: Comparison | PresenceCheck */
1486
	protected $match_IfArgumentPortion_typestack = array('IfArgumentPortion');
1487
	function match_IfArgumentPortion ($stack = array()) {
1488
		$matchrule = "IfArgumentPortion"; $result = $this->construct($matchrule, $matchrule, null);
1489
		$_206 = NULL;
1490
		do {
1491
			$res_203 = $result;
1492
			$pos_203 = $this->pos;
1493
			$matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos;
1494
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1495
			if ($subres !== FALSE) {
1496
				$this->store( $result, $subres );
1497
				$_206 = TRUE; break;
1498
			}
1499
			$result = $res_203;
1500
			$this->pos = $pos_203;
1501
			$matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos;
1502
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1503
			if ($subres !== FALSE) {
1504
				$this->store( $result, $subres );
1505
				$_206 = TRUE; break;
1506
			}
1507
			$result = $res_203;
1508
			$this->pos = $pos_203;
1509
			$_206 = FALSE; break;
1510
		}
1511
		while(0);
1512
		if( $_206 === TRUE ) { return $this->finalise($result); }
1513
		if( $_206 === FALSE) { return FALSE; }
1514
	}
1515
1516
1517
@@ 3193-3220 (lines=28) @@
3190
3191
	/* OldI18NTag: OldSprintfTag | OldTTag */
3192
	protected $match_OldI18NTag_typestack = array('OldI18NTag');
3193
	function match_OldI18NTag ($stack = array()) {
3194
		$matchrule = "OldI18NTag"; $result = $this->construct($matchrule, $matchrule, null);
3195
		$_540 = NULL;
3196
		do {
3197
			$res_537 = $result;
3198
			$pos_537 = $this->pos;
3199
			$matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos;
3200
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3201
			if ($subres !== FALSE) {
3202
				$this->store( $result, $subres );
3203
				$_540 = TRUE; break;
3204
			}
3205
			$result = $res_537;
3206
			$this->pos = $pos_537;
3207
			$matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos;
3208
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3209
			if ($subres !== FALSE) {
3210
				$this->store( $result, $subres );
3211
				$_540 = TRUE; break;
3212
			}
3213
			$result = $res_537;
3214
			$this->pos = $pos_537;
3215
			$_540 = FALSE; break;
3216
		}
3217
		while(0);
3218
		if( $_540 === TRUE ) { return $this->finalise($result); }
3219
		if( $_540 === FALSE) { return FALSE; }
3220
	}
3221
3222
3223
@@ 4099-4126 (lines=28) @@
4096
4097
	/* MalformedBlock: MalformedOpenTag | MalformedCloseTag */
4098
	protected $match_MalformedBlock_typestack = array('MalformedBlock');
4099
	function match_MalformedBlock ($stack = array()) {
4100
		$matchrule = "MalformedBlock"; $result = $this->construct($matchrule, $matchrule, null);
4101
		$_684 = NULL;
4102
		do {
4103
			$res_681 = $result;
4104
			$pos_681 = $this->pos;
4105
			$matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos;
4106
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
4107
			if ($subres !== FALSE) {
4108
				$this->store( $result, $subres );
4109
				$_684 = TRUE; break;
4110
			}
4111
			$result = $res_681;
4112
			$this->pos = $pos_681;
4113
			$matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos;
4114
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
4115
			if ($subres !== FALSE) {
4116
				$this->store( $result, $subres );
4117
				$_684 = TRUE; break;
4118
			}
4119
			$result = $res_681;
4120
			$this->pos = $pos_681;
4121
			$_684 = FALSE; break;
4122
		}
4123
		while(0);
4124
		if( $_684 === TRUE ) { return $this->finalise($result); }
4125
		if( $_684 === FALSE) { return FALSE; }
4126
	}
4127
4128
4129