Skip to content

Commit

Permalink
Merge pull request #3 from ticketscript/SC-960
Browse files Browse the repository at this point in the history
SC-960: Allow repeated value to be replaced
  • Loading branch information
Eugst committed Dec 3, 2015
2 parents 56ced33 + 16b4b04 commit 4f5b490
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,14 @@ private function replaceValues(&$subject, $key, $replaceValuesMap) {

case 'string':
// Replace values in subject
if(isset($replaceValuesMap[$subject])) {
switch (strtolower($replaceValuesMap[$subject])) {
case 'true':
$subject = true;
break;
case 'false':
$subject = false;
break;
default:
$subject = strtr($subject, $replaceValuesMap);
}
$subject = strtr($subject, $replaceValuesMap);
switch (strtolower($subject)) {
case 'true':
$subject = true;
break;
case 'false':
$subject = false;
break;
}
break;
}
Expand Down

0 comments on commit 4f5b490

Please sign in to comment.