@@ -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; |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | ->getInfo() |
| 38 | 38 | ->getTokenByParamName(DecryptInterface::PARAMETER_NAME); |
| 39 | 39 | |
| 40 | - if($token === null) { |
|
| 40 | + if ($token === null) { |
|
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | if (!$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) { |
| 45 | 45 | $this->validationResult->makeError( |
| 46 | - t('Invalid decryption key token:') . ' ' . t('Expected a string.'), |
|
| 46 | + t('Invalid decryption key token:').' '.t('Expected a string.'), |
|
| 47 | 47 | DecryptInterface::VALIDATION_DECRYPT_CODE_WRONG_TYPE |
| 48 | 48 | ); |
| 49 | 49 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $key = $this->getDecryptionKey(); |
| 54 | 54 | |
| 55 | - if($key !== DecryptInterface::DEFAULT_DECRYPTION_KEY) { |
|
| 55 | + if ($key !== DecryptInterface::DEFAULT_DECRYPTION_KEY) { |
|
| 56 | 56 | return; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -73,20 +73,20 @@ discard block |
||
| 73 | 73 | public function getDecryptionKey() : string |
| 74 | 74 | { |
| 75 | 75 | $key = $this->getDecryptionKeyToken(); |
| 76 | - if($key === null) { |
|
| 76 | + if ($key === null) { |
|
| 77 | 77 | return ''; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $key = $key->getText(); |
| 81 | 81 | |
| 82 | - if(empty($key) || $key === DecryptInterface::DEFAULT_DECRYPTION_KEY) { |
|
| 82 | + if (empty($key) || $key === DecryptInterface::DEFAULT_DECRYPTION_KEY) { |
|
| 83 | 83 | return DecryptSettings::getDefaultKey(); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | return $key; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - public function enableDecryption(string $key=DecryptInterface::DEFAULT_DECRYPTION_KEY) : self |
|
| 89 | + public function enableDecryption(string $key = DecryptInterface::DEFAULT_DECRYPTION_KEY) : self |
|
| 90 | 90 | { |
| 91 | 91 | $this->decryptionKeyToken = $this |
| 92 | 92 | ->requireParams() |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | public function disableDecryption() : self |
| 100 | 100 | { |
| 101 | - if(isset($this->decryptionKeyToken)) { |
|
| 101 | + if (isset($this->decryptionKeyToken)) { |
|
| 102 | 102 | $this |
| 103 | 103 | ->requireParams() |
| 104 | 104 | ->getInfo() |