@@ -73,7 +73,7 @@ |
||
| 73 | 73 | // All other special characters have to be escaped |
| 74 | 74 | // with two backslashes. |
| 75 | 75 | foreach ($this->regexSpecialChars as $char) { |
| 76 | - $string = str_replace($char, '\\' . $char, $string); |
|
| 76 | + $string = str_replace($char, '\\'.$char, $string); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // Restore the escaped quotes, which stay escaped |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $cmd = $this->commands->createCommand( |
| 52 | 52 | 'ShowDate', |
| 53 | 53 | '', |
| 54 | - $variableName . $format . $timezone, |
|
| 54 | + $variableName.$format.$timezone, |
|
| 55 | 55 | sprintf( |
| 56 | 56 | '{showdate: %s%s%s}', |
| 57 | 57 | $variableName, |
@@ -60,6 +60,6 @@ |
||
| 60 | 60 | return $string; |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - return '"' . str_replace('"', '\"', $string) . '"'; |
|
| 63 | + return '"'.str_replace('"', '\"', $string).'"'; |
|
| 64 | 64 | } |
| 65 | 65 | } |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $varName = undollarize($command->getVariableName()); |
| 26 | 26 | |
| 27 | - if($command->isDecryptionEnabled()) { |
|
| 27 | + if ($command->isDecryptionEnabled()) { |
|
| 28 | 28 | $varName = sprintf( |
| 29 | 29 | 'text.decrypt(%s, "%s")', |
| 30 | 30 | dollarize($varName), |
| 31 | 31 | $command->getDecryptionKey() |
| 32 | 32 | ); |
| 33 | 33 | |
| 34 | - if($this->hasVariableEncodings($command)) { |
|
| 34 | + if ($this->hasVariableEncodings($command)) { |
|
| 35 | 35 | $varName = '${'.$varName.'}'; |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | ->getInfo() |
| 36 | 36 | ->getTokenByParamName(DecryptInterface::PARAMETER_NAME); |
| 37 | 37 | |
| 38 | - if($token === null) { |
|
| 38 | + if ($token === null) { |
|
| 39 | 39 | return; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $this->validationResult->makeError( |
| 48 | - t('Invalid decryption key token:') . ' ' . t('Expected a string.'), |
|
| 48 | + t('Invalid decryption key token:').' '.t('Expected a string.'), |
|
| 49 | 49 | DecryptInterface::VALIDATION_DECRYPT_CODE_WRONG_TYPE |
| 50 | 50 | ); |
| 51 | 51 | } |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | public function getDecryptionKey() : string |
| 59 | 59 | { |
| 60 | 60 | $key = $this->getDecryptionKeyToken(); |
| 61 | - if($key !== null) { |
|
| 61 | + if ($key !== null) { |
|
| 62 | 62 | return $key->getText(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | return ''; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - public function enableDecryption(string $key=DecryptInterface::DEFAULT_DECRYPTION_KEY) : self |
|
| 68 | + public function enableDecryption(string $key = DecryptInterface::DEFAULT_DECRYPTION_KEY) : self |
|
| 69 | 69 | { |
| 70 | 70 | $this->decryptionKeyToken = $this |
| 71 | 71 | ->requireParams() |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | public function disableDecryption() : self |
| 79 | 79 | { |
| 80 | - if(isset($this->decryptionKeyToken)) { |
|
| 80 | + if (isset($this->decryptionKeyToken)) { |
|
| 81 | 81 | $this |
| 82 | 82 | ->requireParams() |
| 83 | 83 | ->getInfo() |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function getDecryptionKeyToken(): ?Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral; |
| 44 | 44 | |
| 45 | - public function enableDecryption(string $key=DecryptInterface::DEFAULT_DECRYPTION_KEY) : self; |
|
| 45 | + public function enableDecryption(string $key = DecryptInterface::DEFAULT_DECRYPTION_KEY) : self; |
|
| 46 | 46 | |
| 47 | 47 | public function disableDecryption() : self; |
| 48 | 48 | public function isDecryptionEnabled() : bool; |