Code Duplication    Length = 11-11 lines in 2 locations

view/SSTemplateParser.php 1 location

@@ 1267-1277 (lines=11) @@
1264
		$res['php'] = "'" . str_replace("'", "\\'", $sub['String']['text']) . "'";
1265
	}
1266
1267
	function Argument_Lookup(&$res, $sub) {
1268
		if (count($sub['LookupSteps']) == 1 && !isset($sub['LookupSteps'][0]['Call']['Arguments'])) {
1269
			$res['ArgumentMode'] = 'default';
1270
			$res['lookup_php'] = $sub['php'];
1271
			$res['string_php'] = "'".$sub['LookupSteps'][0]['Call']['Method']['text']."'";
1272
		}
1273
		else {
1274
			$res['ArgumentMode'] = 'lookup';
1275
			$res['php'] = $sub['php'];
1276
		}
1277
	}
1278
	
1279
	function Argument_FreeString(&$res, $sub) {
1280
		$res['ArgumentMode'] = 'string';

view/SSTemplateParser.php.inc 1 location

@@ 435-445 (lines=11) @@
432
		$res['php'] = "'" . str_replace("'", "\\'", $sub['String']['text']) . "'";
433
	}
434
435
	function Argument_Lookup(&$res, $sub) {
436
		if (count($sub['LookupSteps']) == 1 && !isset($sub['LookupSteps'][0]['Call']['Arguments'])) {
437
			$res['ArgumentMode'] = 'default';
438
			$res['lookup_php'] = $sub['php'];
439
			$res['string_php'] = "'".$sub['LookupSteps'][0]['Call']['Method']['text']."'";
440
		}
441
		else {
442
			$res['ArgumentMode'] = 'lookup';
443
			$res['php'] = $sub['php'];
444
		}
445
	}
446
	
447
	function Argument_FreeString(&$res, $sub) {
448
		$res['ArgumentMode'] = 'string';