Code Duplication    Length = 11-11 lines in 2 locations

view/SSTemplateParser.php 1 location

@@ 1255-1265 (lines=11) @@
1252
		$res['php'] = "'" . str_replace("'", "\\'", $sub['String']['text']) . "'";
1253
	}
1254
1255
	function Argument_Lookup(&$res, $sub) {
1256
		if (count($sub['LookupSteps']) == 1 && !isset($sub['LookupSteps'][0]['Call']['Arguments'])) {
1257
			$res['ArgumentMode'] = 'default';
1258
			$res['lookup_php'] = $sub['php'];
1259
			$res['string_php'] = "'".$sub['LookupSteps'][0]['Call']['Method']['text']."'";
1260
		}
1261
		else {
1262
			$res['ArgumentMode'] = 'lookup';
1263
			$res['php'] = $sub['php'];
1264
		}
1265
	}
1266
1267
	function Argument_FreeString(&$res, $sub) {
1268
		$res['ArgumentMode'] = 'string';

view/SSTemplateParser.php.inc 1 location

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