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