Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function translate(Mailcode_Commands_Command_SetVariable $command): string |
||
25 | { |
||
26 | $assignmentString = $command->getAssignmentString(); |
||
27 | |||
28 | if ($command->isCountEnabled()) |
||
29 | { |
||
30 | $result = $this->buildCountAssignment($command); |
||
31 | if($result !== null) { |
||
32 | $assignmentString = $result; |
||
33 | } |
||
34 | } |
||
35 | |||
36 | return sprintf( |
||
37 | '{%% set %s = %s %%}', |
||
38 | $this->formatVariableName($command->getVariable()->getFullName()), |
||
39 | $this->formatVariablesInString($assignmentString) |
||
40 | ); |
||
57 |