Passed
Push — master ( 752e50...38d7a4 )
by Sebastian
04:24
created
src/Mailcode/Traits/Commands/Validation/DecryptTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
             ->getInfo()
35 35
             ->getTokenByParamName(DecryptInterface::PARAMETER_NAME);
36 36
 
37
-        if($token === null) {
37
+        if ($token === null) {
38 38
             return;
39 39
         }
40 40
 
41 41
         if (!$token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral) {
42 42
             $this->validationResult->makeError(
43
-                t('Invalid decryption key token:') . ' ' . t('Expected a string.'),
43
+                t('Invalid decryption key token:').' '.t('Expected a string.'),
44 44
                 DecryptInterface::VALIDATION_DECRYPT_CODE_WRONG_TYPE
45 45
             );
46 46
         }
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
     public function getDecryptionKeyName() : string
57 57
     {
58 58
         $key = $this->getDecryptionKeyToken();
59
-        if($key === null) {
59
+        if ($key === null) {
60 60
             return '';
61 61
         }
62 62
 
63 63
         $keyName = $key->getText();
64 64
 
65
-        if(empty($keyName)) {
65
+        if (empty($keyName)) {
66 66
             $keyName = (string)DecryptSettings::getDefaultKeyName();
67 67
         }
68 68
 
69 69
         return $keyName;
70 70
     }
71 71
 
72
-    public function enableDecryption(string $keyName=DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self
72
+    public function enableDecryption(string $keyName = DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self
73 73
     {
74 74
         $this->decryptionKeyToken = $this
75 75
             ->requireParams()
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     public function disableDecryption() : self
83 83
     {
84
-        if(isset($this->decryptionKeyToken)) {
84
+        if (isset($this->decryptionKeyToken)) {
85 85
             $this
86 86
                 ->requireParams()
87 87
                 ->getInfo()
Please login to merge, or discard this patch.
src/Mailcode/Interfaces/Commands/Validation/DecryptInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function getDecryptionKeyToken(): ?Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral;
42 42
 
43
-    public function enableDecryption(string $keyName=DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self;
43
+    public function enableDecryption(string $keyName = DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self;
44 44
 
45 45
     public function disableDecryption() : self;
46 46
     public function isDecryptionEnabled() : bool;
Please login to merge, or discard this patch.