Passed
Push — master ( 742ef2...7822c6 )
by Sebastian
04:11
created
src/Mailcode/Interfaces/Commands/Validation/URLDecode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      * @return $this
33 33
      * @throws ParamsException
34 34
      */
35
-    public function setURLDecoding(bool $enabled=true) : self;
35
+    public function setURLDecoding(bool $enabled = true) : self;
36 36
 
37 37
     public function isURLDecoded(): bool;
38 38
 }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowURL.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,16 +48,16 @@
 block discarded – undo
48 48
         $statements = array();
49 49
         $statements[] = $this->renderURL($urlVar);
50 50
 
51
-        if($command->isTrackingEnabled())
51
+        if ($command->isTrackingEnabled())
52 52
         {
53 53
             $statements[] = $this->renderTracking($command);
54 54
         }
55 55
 
56
-        if($command->hasQueryParams())
56
+        if ($command->hasQueryParams())
57 57
         {
58 58
             $params = $command->getQueryParams();
59 59
 
60
-            foreach($params as $name => $value)
60
+            foreach ($params as $name => $value)
61 61
             {
62 62
                 $statements[] = $this->renderQueryParam($name, $value);
63 63
             }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         
73 73
         // All other special characters have to be escaped
74 74
         // with two backslashes. 
75
-        foreach($this->regexSpecialChars as $char)
75
+        foreach ($this->regexSpecialChars as $char)
76 76
         {
77 77
             $string = str_replace($char, '\\'.$char, $string);
78 78
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     protected function renderVariableEncodings(Mailcode_Commands_Command $command, string $varName) : string
88 88
     {
89
-        if(!$command instanceof EncodableInterface || !$command->hasActiveEncodings())
89
+        if (!$command instanceof EncodableInterface || !$command->hasActiveEncodings())
90 90
         {
91 91
             return sprintf(
92 92
                 '${%s}',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $varName = '$'.ltrim($varName, '$');
103 103
 
104
-        if($absolute)
104
+        if ($absolute)
105 105
         {
106 106
             $varName = sprintf('${price.abs(%s)}', $varName);
107 107
         }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         $encodings = $command->getActiveEncodings();
154 154
         $result = $statement;
155 155
 
156
-        foreach($encodings as $encoding)
156
+        foreach ($encodings as $encoding)
157 157
         {
158 158
             $result = $this->renderEncoding($encoding, $result);
159 159
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/EncodableTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function setEncodingEnabled(string $keyword, bool $enabled) : self
54 54
     {
55
-        if(!$this->supportsEncoding($keyword))
55
+        if (!$this->supportsEncoding($keyword))
56 56
         {
57 57
             throw new Mailcode_Exception(
58 58
                 'Cannot set encoding status, command does not support target encoding.',
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         {
94 94
             $name = $keyword->getKeyword();
95 95
 
96
-            if($this->supportsEncoding($name) && $this->isEncodingEnabled($name))
96
+            if ($this->supportsEncoding($name) && $this->isEncodingEnabled($name))
97 97
             {
98 98
                 $result[] = $name;
99 99
             }
@@ -106,22 +106,22 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $encodings = array();
108 108
 
109
-        if($this instanceof Mailcode_Interfaces_Commands_Validation_URLEncode)
109
+        if ($this instanceof Mailcode_Interfaces_Commands_Validation_URLEncode)
110 110
         {
111 111
             $encodings[] = Mailcode_Commands_Keywords::TYPE_URLENCODE;
112 112
         }
113 113
 
114
-        if($this instanceof Mailcode_Interfaces_Commands_Validation_URLDecode)
114
+        if ($this instanceof Mailcode_Interfaces_Commands_Validation_URLDecode)
115 115
         {
116 116
             $encodings[] = Mailcode_Commands_Keywords::TYPE_URLDECODE;
117 117
         }
118 118
 
119
-        if($this instanceof IDNEncodeInterface)
119
+        if ($this instanceof IDNEncodeInterface)
120 120
         {
121 121
             $encodings[] = Mailcode_Commands_Keywords::TYPE_IDN_ENCODE;
122 122
         }
123 123
 
124
-        if($this instanceof IDNDecodeInterface)
124
+        if ($this instanceof IDNDecodeInterface)
125 125
         {
126 126
             $encodings[] = Mailcode_Commands_Keywords::TYPE_IDN_DECODE;
127 127
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/URLDecode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @return $this
36 36
      * @throws Mailcode_Exception
37 37
      */
38
-    public function setURLDecoding(bool $enabled=true) : self
38
+    public function setURLDecoding(bool $enabled = true) : self
39 39
     {
40 40
         return $this->setEncodingEnabled(Mailcode_Commands_Keywords::TYPE_URLDECODE, $enabled);
41 41
     }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/URLEncode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * @return $this
42 42
      * @throws Mailcode_Exception
43 43
      */
44
-    public function setURLEncoding(bool $enabled=true) : self
44
+    public function setURLEncoding(bool $enabled = true) : self
45 45
     {
46 46
         return $this->setEncodingEnabled(Mailcode_Commands_Keywords::TYPE_URLENCODE, $enabled);
47 47
     }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command/ShowEncoded.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getTextToken() : Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral
68 68
     {
69
-        if(isset($this->textToken))
69
+        if (isset($this->textToken))
70 70
         {
71 71
             return $this->textToken;
72 72
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
     public function setText(string $text) : self
87 87
     {
88
-        if(isset($this->textToken))
88
+        if (isset($this->textToken))
89 89
         {
90 90
             $this->textToken->setText($text);
91 91
             return $this;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->getInfo()
105 105
             ->getStringLiterals();
106 106
 
107
-        if(empty($strings))
107
+        if (empty($strings))
108 108
         {
109 109
             $this->getValidationResult()->makeError(
110 110
                 t('No text to encode has been specified.'),
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             ->getInfo()
123 123
             ->getKeywords();
124 124
 
125
-        if(!empty($keywords))
125
+        if (!empty($keywords))
126 126
         {
127 127
             return;
128 128
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show/Encoded.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
         $this->instantiator->checkCommand($cmd);
45 45
 
46
-        if($cmd instanceof Mailcode_Commands_Command_ShowEncoded)
46
+        if ($cmd instanceof Mailcode_Commands_Command_ShowEncoded)
47 47
         {
48 48
             return $cmd;
49 49
         }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $params = array();
62 62
         $params[] = $this->instantiator->quoteString($subject);
63 63
 
64
-        foreach($encodings as $keyword)
64
+        foreach ($encodings as $keyword)
65 65
         {
66 66
             $params[] = $this->instantiator->filterKeyword($keyword);
67 67
         }
Please login to merge, or discard this patch.