Conditions | 3 |
Paths | 4 |
Total Lines | 27 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | private function renderDecryptionKey(Mailcode_Commands_Command_ShowVariable $command) : string |
||
41 | { |
||
42 | $keyName = $command->getDecryptionKeyName(); |
||
43 | |||
44 | if(!empty($keyName)) |
||
45 | { |
||
46 | $varName = sprintf( |
||
47 | 'text.decrypt(%s, "%s")', |
||
48 | dollarize($command->getVariableName()), |
||
49 | $keyName |
||
50 | ); |
||
51 | } |
||
52 | else |
||
53 | { |
||
54 | // This will make the decryption system use the system's |
||
55 | // default key name. |
||
56 | $varName = sprintf( |
||
57 | 'text.decrypt(%s)', |
||
58 | dollarize($command->getVariableName()) |
||
59 | ); |
||
60 | } |
||
61 | |||
62 | if($this->hasVariableEncodings($command)) { |
||
63 | $varName = '${'.$varName.'}'; |
||
64 | } |
||
65 | |||
66 | return $varName; |
||
67 | } |
||
69 |