Code Duplication    Length = 28-28 lines in 4 locations

view/SSTemplateParser.php 4 locations

@@ 1038-1065 (lines=28) @@
1035
1036
	/* Injection: BracketInjection | SimpleInjection */
1037
	protected $match_Injection_typestack = array('Injection');
1038
	function match_Injection ($stack = array()) {
1039
		$matchrule = "Injection"; $result = $this->construct($matchrule, $matchrule, null);
1040
		$_137 = NULL;
1041
		do {
1042
			$res_134 = $result;
1043
			$pos_134 = $this->pos;
1044
			$matcher = 'match_'.'BracketInjection'; $key = $matcher; $pos = $this->pos;
1045
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1046
			if ($subres !== FALSE) {
1047
				$this->store( $result, $subres );
1048
				$_137 = TRUE; break;
1049
			}
1050
			$result = $res_134;
1051
			$this->pos = $pos_134;
1052
			$matcher = 'match_'.'SimpleInjection'; $key = $matcher; $pos = $this->pos;
1053
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1054
			if ($subres !== FALSE) {
1055
				$this->store( $result, $subres );
1056
				$_137 = TRUE; break;
1057
			}
1058
			$result = $res_134;
1059
			$this->pos = $pos_134;
1060
			$_137 = FALSE; break;
1061
		}
1062
		while(0);
1063
		if( $_137 === TRUE ) { return $this->finalise($result); }
1064
		if( $_137 === FALSE) { return FALSE; }
1065
	}
1066
1067
1068
@@ 1499-1526 (lines=28) @@
1496
1497
	/* IfArgumentPortion: Comparison | PresenceCheck */
1498
	protected $match_IfArgumentPortion_typestack = array('IfArgumentPortion');
1499
	function match_IfArgumentPortion ($stack = array()) {
1500
		$matchrule = "IfArgumentPortion"; $result = $this->construct($matchrule, $matchrule, null);
1501
		$_207 = NULL;
1502
		do {
1503
			$res_204 = $result;
1504
			$pos_204 = $this->pos;
1505
			$matcher = 'match_'.'Comparison'; $key = $matcher; $pos = $this->pos;
1506
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1507
			if ($subres !== FALSE) {
1508
				$this->store( $result, $subres );
1509
				$_207 = TRUE; break;
1510
			}
1511
			$result = $res_204;
1512
			$this->pos = $pos_204;
1513
			$matcher = 'match_'.'PresenceCheck'; $key = $matcher; $pos = $this->pos;
1514
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
1515
			if ($subres !== FALSE) {
1516
				$this->store( $result, $subres );
1517
				$_207 = TRUE; break;
1518
			}
1519
			$result = $res_204;
1520
			$this->pos = $pos_204;
1521
			$_207 = FALSE; break;
1522
		}
1523
		while(0);
1524
		if( $_207 === TRUE ) { return $this->finalise($result); }
1525
		if( $_207 === FALSE) { return FALSE; }
1526
	}
1527
1528
1529
@@ 3205-3232 (lines=28) @@
3202
	
3203
	/* OldI18NTag: OldSprintfTag | OldTTag */
3204
	protected $match_OldI18NTag_typestack = array('OldI18NTag');
3205
	function match_OldI18NTag ($stack = array()) {
3206
		$matchrule = "OldI18NTag"; $result = $this->construct($matchrule, $matchrule, null);
3207
		$_541 = NULL;
3208
		do {
3209
			$res_538 = $result;
3210
			$pos_538 = $this->pos;
3211
			$matcher = 'match_'.'OldSprintfTag'; $key = $matcher; $pos = $this->pos;
3212
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3213
			if ($subres !== FALSE) {
3214
				$this->store( $result, $subres );
3215
				$_541 = TRUE; break;
3216
			}
3217
			$result = $res_538;
3218
			$this->pos = $pos_538;
3219
			$matcher = 'match_'.'OldTTag'; $key = $matcher; $pos = $this->pos;
3220
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
3221
			if ($subres !== FALSE) {
3222
				$this->store( $result, $subres );
3223
				$_541 = TRUE; break;
3224
			}
3225
			$result = $res_538;
3226
			$this->pos = $pos_538;
3227
			$_541 = FALSE; break;
3228
		}
3229
		while(0);
3230
		if( $_541 === TRUE ) { return $this->finalise($result); }
3231
		if( $_541 === FALSE) { return FALSE; }
3232
	}
3233
3234
3235
@@ 4102-4129 (lines=28) @@
4099
	
4100
	/* MalformedBlock: MalformedOpenTag | MalformedCloseTag */
4101
	protected $match_MalformedBlock_typestack = array('MalformedBlock');
4102
	function match_MalformedBlock ($stack = array()) {
4103
		$matchrule = "MalformedBlock"; $result = $this->construct($matchrule, $matchrule, null);
4104
		$_685 = NULL;
4105
		do {
4106
			$res_682 = $result;
4107
			$pos_682 = $this->pos;
4108
			$matcher = 'match_'.'MalformedOpenTag'; $key = $matcher; $pos = $this->pos;
4109
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
4110
			if ($subres !== FALSE) {
4111
				$this->store( $result, $subres );
4112
				$_685 = TRUE; break;
4113
			}
4114
			$result = $res_682;
4115
			$this->pos = $pos_682;
4116
			$matcher = 'match_'.'MalformedCloseTag'; $key = $matcher; $pos = $this->pos;
4117
			$subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );
4118
			if ($subres !== FALSE) {
4119
				$this->store( $result, $subres );
4120
				$_685 = TRUE; break;
4121
			}
4122
			$result = $res_682;
4123
			$this->pos = $pos_682;
4124
			$_685 = FALSE; break;
4125
		}
4126
		while(0);
4127
		if( $_685 === TRUE ) { return $this->finalise($result); }
4128
		if( $_685 === FALSE) { return FALSE; }
4129
	}
4130
4131
4132