Passed
Push — master ( e6fd03...a950a4 )
by Sebastian
04:03
created
src/Mailcode/Translator/Syntax/ApacheVelocity/SetVariableTranslation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         if ($command->isCountEnabled())
28 28
         {
29 29
             $result = $this->buildCountAssignment($command);
30
-            if($result !== null) {
30
+            if ($result !== null) {
31 31
                 $assignmentString = $result;
32 32
             }
33 33
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             return null;
48 48
         }
49 49
 
50
-        if($variable->hasPath()) {
50
+        if ($variable->hasPath()) {
51 51
             return sprintf(
52 52
                 '$map.of(%s).keys("%s").count()',
53 53
                 dollarize($variable->getPath()),
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowVariableTranslation.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function translate(Mailcode_Commands_Command_ShowVariable $command): string
24 24
     {
25
-        if($command->isDecryptionEnabled())
25
+        if ($command->isDecryptionEnabled())
26 26
         {
27 27
             $varName = $this->renderDecryptionKey($command);
28 28
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $keyName = $command->getDecryptionKeyName();
40 40
 
41
-        if(!empty($keyName))
41
+        if (!empty($keyName))
42 42
         {
43 43
             $varName = sprintf(
44 44
                 'text.decrypt(%s, "%s")',
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             );
57 57
         }
58 58
 
59
-        if($this->hasVariableEncodings($command)) {
59
+        if ($this->hasVariableEncodings($command)) {
60 60
             $varName = '${'.$varName.'}';
61 61
         }
62 62
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
         if($command->isDecryptionEnabled())
26 26
         {
27 27
             $varName = $this->renderDecryptionKey($command);
28
-        }
29
-        else
28
+        } else
30 29
         {
31 30
             $varName = undollarize($command->getVariableName());
32 31
         }
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
                 dollarize($command->getVariableName()),
46 45
                 $keyName
47 46
             );
48
-        }
49
-        else
47
+        } else
50 48
         {
51 49
             // This will make the decryption system use the system's
52 50
             // default key name.
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/HubL/EndTranslation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
31 31
         // This ending command is tied to a preprocessing command: Since
32 32
         // we do not want to keep these, we return an empty string to strip
33 33
         // it out.
34
-        if($openCmd instanceof Mailcode_Interfaces_Commands_PreProcessing) {
34
+        if ($openCmd instanceof Mailcode_Interfaces_Commands_PreProcessing) {
35 35
             return '';
36 36
         }
37 37
 
38
-        if($openCmd instanceof Mailcode_Commands_Command_For) {
38
+        if ($openCmd instanceof Mailcode_Commands_Command_For) {
39 39
             return '{% endfor %}';
40 40
         }
41 41
 
42
-        if($openCmd instanceof Mailcode_Commands_IfBase) {
42
+        if ($openCmd instanceof Mailcode_Commands_IfBase) {
43 43
             return '{% endif %}';
44 44
         }
45 45
 
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/HubL/ShowNumberTranslation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,6 +23,6 @@
 block discarded – undo
23 23
 {
24 24
     public function translate(Mailcode_Commands_Command_ShowNumber $command): string
25 25
     {
26
-        return '{{ ' . $command->getVariableName() . ' }}';
26
+        return '{{ '.$command->getVariableName().' }}';
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/HubL/SetVariableTranslation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         if ($command->isCountEnabled())
29 29
         {
30 30
             $result = $this->buildCountAssignment($command);
31
-            if($result !== null) {
31
+            if ($result !== null) {
32 32
                 $assignmentString = $result;
33 33
             }
34 34
         }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/HubL/ShowPhoneTranslation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
 {
27 27
     public function translate(Mailcode_Commands_Command_ShowPhone $command): string
28 28
     {
29
-        return '{{ ' . $command->getVariableName() . ' }}';
29
+        return '{{ '.$command->getVariableName().' }}';
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/IDNDecodeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * @param bool $enabled
34 34
      * @return $this
35 35
      */
36
-    public function setIDNDecoding(bool $enabled=true) : self
36
+    public function setIDNDecoding(bool $enabled = true) : self
37 37
     {
38 38
         return $this->setEncodingEnabled(Mailcode_Commands_Keywords::TYPE_IDN_DECODE, $enabled);
39 39
     }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/IDNEncodeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * @param bool $enabled
34 34
      * @return $this
35 35
      */
36
-    public function setIDNEncoding(bool $enabled=true) : self
36
+    public function setIDNEncoding(bool $enabled = true) : self
37 37
     {
38 38
         return $this->setEncodingEnabled(Mailcode_Commands_Keywords::TYPE_IDN_ENCODE, $enabled);
39 39
     }
Please login to merge, or discard this patch.
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
             return;
@@ -57,20 +57,20 @@  discard block
 block discarded – undo
57 57
     public function getDecryptionKeyName() : string
58 58
     {
59 59
         $key = $this->getDecryptionKeyToken();
60
-        if($key === null) {
60
+        if ($key === null) {
61 61
             return '';
62 62
         }
63 63
 
64 64
         $keyName = $key->getText();
65 65
 
66
-        if(empty($keyName)) {
66
+        if (empty($keyName)) {
67 67
             $keyName = (string)DecryptSettings::getDefaultKeyName();
68 68
         }
69 69
 
70 70
         return $keyName;
71 71
     }
72 72
 
73
-    public function enableDecryption(string $keyName=DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self
73
+    public function enableDecryption(string $keyName = DecryptInterface::DEFAULT_DECRYPTION_KEY_NAME) : self
74 74
     {
75 75
         $this->decryptionKeyToken = $this
76 76
             ->requireParams()
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function disableDecryption() : self
84 84
     {
85
-        if(isset($this->decryptionKeyToken)) {
85
+        if (isset($this->decryptionKeyToken)) {
86 86
             $this
87 87
                 ->requireParams()
88 88
                 ->getInfo()
Please login to merge, or discard this patch.