Passed
Push — master ( e7d92c...5f8fb3 )
by Sebastian
02:27
created
src/Mailcode/Parser/Safeguard/Formatter/Type/MarkVariables.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     
61 61
     public function setTemplate(string $template) : Mailcode_Parser_Safeguard_Formatter_Type_MarkVariables
62 62
     {
63
-        if(substr_count($template, '%s') !== 1)
63
+        if (substr_count($template, '%s') !== 1)
64 64
         {
65 65
             throw new Mailcode_Exception(
66 66
                 'Invalid tag template',
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $parts = explode('%s', $this->getTemplate());
102 102
         $tag = array_shift($parts);
103 103
 
104
-        if($this->templateMode === self::TEMPLATE_MODE_INLINE)
104
+        if ($this->templateMode === self::TEMPLATE_MODE_INLINE)
105 105
         {
106 106
             $tag = str_replace('__STYLES__', $this->getInlineStyles(), $tag);
107 107
         }
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
         $styles = '';
130 130
         $regex = '/\.'.self::DEFAULT_CLASS_NAME.'{([^}]+)}/';
131 131
 
132
-        if(preg_match($regex, $this->getCSS(), $matches))
132
+        if (preg_match($regex, $this->getCSS(), $matches))
133 133
         {
134 134
             $styles = $matches[1];
135 135
         }
136 136
 
137
-        if(empty($styles))
137
+        if (empty($styles))
138 138
         {
139 139
             throw new Mailcode_Exception(
140 140
                 'Cannot extract styles.',
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         $file = MAILCODE_INSTALL_FOLDER.'/css/marked-variables.css';
192 192
         $path = realpath($file);
193 193
 
194
-        if($path !== false)
194
+        if ($path !== false)
195 195
         {
196 196
             return $path;
197 197
         }
Please login to merge, or discard this patch.
src/Mailcode/Parser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         
79 79
         $total = count($matches[0]);
80 80
         
81
-        for($i=0; $i < $total; $i++)
81
+        for ($i = 0; $i < $total; $i++)
82 82
         {
83 83
             $match = $this->parseMatch($matches, $i);
84 84
             
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     
91 91
     protected function prepareString(string $subject) : string
92 92
     {
93
-        if(!ConvertHelper::isStringHTML($subject))
93
+        if (!ConvertHelper::isStringHTML($subject))
94 94
         {
95 95
             return $subject;
96 96
         }
@@ -140,17 +140,17 @@  discard block
 block discarded – undo
140 140
     private function handleNesting(Mailcode_Commands_Command $cmd) : void
141 141
     {
142 142
         // Set the command's parent from the stack, if any is present.
143
-        if(!empty($this->stack))
143
+        if (!empty($this->stack))
144 144
         {
145 145
             $cmd->setParent($this->stack[array_key_last($this->stack)]);
146 146
         }
147 147
 
148 148
         // Handle opening and closing commands, adding and removing from the stack.
149
-        if($cmd instanceof Mailcode_Commands_Command_Type_Opening)
149
+        if ($cmd instanceof Mailcode_Commands_Command_Type_Opening)
150 150
         {
151 151
             $this->stack[] = $cmd;
152 152
         }
153
-        else if($cmd instanceof Mailcode_Commands_Command_Type_Closing)
153
+        else if ($cmd instanceof Mailcode_Commands_Command_Type_Closing)
154 154
         {
155 155
             array_pop($this->stack);
156 156
         }
@@ -177,16 +177,16 @@  discard block
 block discarded – undo
177 177
         // 5 = parameter type command, type
178 178
         // 6 = parameter type command, params
179 179
         
180
-        if(!empty($matches[1][$index]))
180
+        if (!empty($matches[1][$index]))
181 181
         {
182 182
             $name = $matches[1][$index];
183 183
         }
184
-        else if(!empty($matches[2][$index]))
184
+        else if (!empty($matches[2][$index]))
185 185
         {
186 186
             $name = $matches[2][$index];
187 187
             $params = $matches[3][$index];
188 188
         }
189
-        else if(!empty($matches[4][$index]))
189
+        else if (!empty($matches[4][$index]))
190 190
         {
191 191
             $name = $matches[4][$index];
192 192
             $type = $matches[5][$index];
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/Base/AbstractIf.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         // IF type.
40 40
         $method = 'translate'.$this->getIfType($command);
41 41
 
42
-        if(method_exists($this, $method))
42
+        if (method_exists($this, $method))
43 43
         {
44 44
             return strval($this->$method($command));
45 45
         }
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
         
54 54
         $keywords = $command->getLogicKeywords()->getKeywords();
55 55
         
56
-        foreach($keywords as $keyword)
56
+        foreach ($keywords as $keyword)
57 57
         {
58 58
             $keyCommand = $keyword->getCommand();
59 59
             
60
-            if($keyCommand instanceof Mailcode_Commands_IfBase)
60
+            if ($keyCommand instanceof Mailcode_Commands_IfBase)
61 61
             {
62 62
                 $body .= ' '.$this->getSign($keyword).' '.$this->translateBody($keyCommand);
63 63
             }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     
81 81
     protected function getSign(Mailcode_Commands_LogicKeywords_Keyword $keyword) : string
82 82
     {
83
-        switch($keyword->getName())
83
+        switch ($keyword->getName())
84 84
         {
85 85
             case 'and':
86 86
                 return '&&';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     {
104 104
         $sign = '';
105 105
         
106
-        if($notEmpty)
106
+        if ($notEmpty)
107 107
         {
108 108
             $sign = '!';
109 109
         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     {
120 120
         $params = $command->getParams();
121 121
         
122
-        if(!$params)
122
+        if (!$params)
123 123
         {
124 124
             return '';
125 125
         }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $test = strtolower(trim($value, '"'));
133 133
         $fullName = $variable->getFullName();
134 134
 
135
-        if(in_array($test, array('true', 'false')))
135
+        if (in_array($test, array('true', 'false')))
136 136
         {
137 137
             $fullName .= '.toLowerCase()';
138 138
             $value = '"'.$test.'"';
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
         $varName = $variable->getFullName();
160 160
 
161 161
         $opts = 's';
162
-        if($caseSensitive)
162
+        if ($caseSensitive)
163 163
         {
164 164
             $opts = 'is';
165 165
         }
166 166
         
167
-        foreach($searchTerms as $token)
167
+        foreach ($searchTerms as $token)
168 168
         {
169 169
             $parts[] = sprintf(
170 170
                 '%s.matches("(?%s)%s")',
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     protected function _translateSearch(string $mode, Mailcode_Variables_Variable $variable, bool $caseSensitive, string $searchTerm) : string
181 181
     {
182 182
         $method = $mode.'With';
183
-        if($caseSensitive)
183
+        if ($caseSensitive)
184 184
         {
185 185
             $method = $mode.'WithIgnoreCase';
186 186
         }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowVariable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $varName = ltrim($command->getVariableName(), '$');
26 26
 
27 27
         // Automatically URL escape the variable if it's in an URL.
28
-        if($command->isURLEncoded())
28
+        if ($command->isURLEncoded())
29 29
         {
30 30
             return sprintf(
31 31
                 '${esc.url($%s)}',
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowDate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
         $varName = ltrim($command->getVariableName(), '$');
57 57
         $javaFormat = $this->translateFormat($command->getFormatString());
58 58
 
59
-        if(empty($internalFormat))
59
+        if (empty($internalFormat))
60 60
         {
61 61
             $internalFormat = self::DEFAULT_INTERNAL_FORMAT;
62 62
         }
63 63
 
64
-        if($command->isURLEncoded())
64
+        if ($command->isURLEncoded())
65 65
         {
66 66
             return sprintf(
67 67
                 '${esc.url($date.format("%s", $date.toDate("%s", $%s)))}',
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
         $chars = ConvertHelper::string2array($formatString);
85 85
         $result = array();
86 86
         
87
-        foreach($chars as $char)
87
+        foreach ($chars as $char)
88 88
         {
89
-            if(!isset($this->charTable[$char]))
89
+            if (!isset($this->charTable[$char]))
90 90
             {
91 91
                 throw new Mailcode_Translator_Exception(
92 92
                     'Unknown date format string character',
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowSnippet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $varName = ltrim($command->getVariableName(), '$');
31 31
 
32
-        if($command->isURLEncoded())
32
+        if ($command->isURLEncoded())
33 33
         {
34 34
             return sprintf(
35 35
                 '${esc.url($%s.replaceAll($esc.newline, "<br/>"))}',
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/ShowNumber.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $locale
41 41
         );
42 42
 
43
-        if($command->isURLEncoded())
43
+        if ($command->isURLEncoded())
44 44
         {
45 45
             return sprintf(
46 46
                 '${esc.url($%s)}',
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $dc = '_';
93 93
         }
94 94
 
95
-        $type = $th . $dc;
95
+        $type = $th.$dc;
96 96
 
97 97
         if (isset($this->typeLocales[$type])) {
98 98
             return $this->typeLocales[$type];
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $result = '#';
107 107
 
108
-        if($format->hasThousandsSeparator())
108
+        if ($format->hasThousandsSeparator())
109 109
         {
110 110
             $result = '#,###';
111 111
         }
112 112
 
113
-        if($format->hasDecimals())
113
+        if ($format->hasDecimals())
114 114
         {
115 115
             $result .= '.'.str_repeat('#', $format->getDecimals());
116 116
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @param string $formatString A date format string, or empty string for default.
48 48
      * @return Mailcode_Commands_Command_ShowDate
49 49
      */
50
-    public static function showDate(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowDate
50
+    public static function showDate(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowDate
51 51
     {
52 52
         return self::$commandSets->show()->showDate($variableName, $formatString);
53 53
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param string $formatString A number format string, or empty string for default.
61 61
      * @return Mailcode_Commands_Command_ShowNumber
62 62
      */
63
-    public static function showNumber(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowNumber
63
+    public static function showNumber(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowNumber
64 64
     {
65 65
         return self::$commandSets->show()->showNumber($variableName, $formatString);
66 66
     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     * 
88 88
     * @see Mailcode_Factory::ERROR_INVALID_COMMAND_CREATED
89 89
     */
90
-    public static function setVar(string $variableName, string $value, bool $quoteValue=true) : Mailcode_Commands_Command_SetVariable
90
+    public static function setVar(string $variableName, string $value, bool $quoteValue = true) : Mailcode_Commands_Command_SetVariable
91 91
     {
92 92
         return self::$commandSets->set()->setVar($variableName, $value, $quoteValue);
93 93
     }
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
         return self::$commandSets->if()->end();
121 121
     }
122 122
     
123
-    public static function if(string $condition, string $type='') : Mailcode_Commands_Command_If
123
+    public static function if (string $condition, string $type = '') : Mailcode_Commands_Command_If
124 124
     {
125 125
         return self::$commandSets->if()->if($condition, $type);
126 126
     }
127 127
     
128
-    public static function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
128
+    public static function ifVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
129 129
     {
130 130
         return self::$commandSets->if()->ifVar($variable, $operand, $value, $quoteValue);
131 131
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         return self::$commandSets->if()->ifVarString($variable, $operand, $value);
136 136
     }
137 137
     
138
-    public static function ifVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
138
+    public static function ifVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
139 139
     {
140 140
         return self::$commandSets->if()->ifVarEquals($variable, $value, $quoteValue);
141 141
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         return self::$commandSets->if()->ifVarEqualsString($variable, $value);
146 146
     }
147 147
     
148
-    public static function ifVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
148
+    public static function ifVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
149 149
     {
150 150
         return self::$commandSets->if()->ifVarNotEquals($variable, $value, $quoteValue);
151 151
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         return self::$commandSets->if()->ifVarNotEqualsString($variable, $value);
156 156
     }
157 157
     
158
-    public static function elseIf(string $condition, string $type='') : Mailcode_Commands_Command_ElseIf
158
+    public static function elseIf (string $condition, string $type = '') : Mailcode_Commands_Command_ElseIf
159 159
     {
160 160
         return self::$commandSets->elseIf()->elseIf($condition, $type);
161 161
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         return self::$commandSets->elseIf()->elseIfNotEmpty($variable);
171 171
     }
172 172
     
173
-    public static function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
173
+    public static function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
174 174
     {
175 175
         return self::$commandSets->elseIf()->elseIfVar($variable, $operand, $value, $quoteValue);
176 176
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         return self::$commandSets->elseIf()->elseIfVarString($variable, $operand, $value);
181 181
     }
182 182
     
183
-    public static function elseIfVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
183
+    public static function elseIfVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
184 184
     {
185 185
         return self::$commandSets->elseIf()->elseIfVarEquals($variable, $value, $quoteValue);
186 186
     }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         return self::$commandSets->elseIf()->elseIfVarEqualsString($variable, $value);
191 191
     }
192 192
     
193
-    public static function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
193
+    public static function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
194 194
     {
195 195
         return self::$commandSets->elseIf()->elseIfVarNotEquals($variable, $value, $quoteValue);
196 196
     }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
         return self::$commandSets->elseIf()->elseIfVarNotEqualsString($variable, $value);
201 201
     }
202 202
 
203
-    public static function ifBeginsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_BeginsWith
203
+    public static function ifBeginsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_BeginsWith
204 204
     {
205 205
         return self::$commandSets->if()->ifBeginsWith($variable, $search, $caseInsensitive);
206 206
     }
@@ -220,22 +220,22 @@  discard block
 block discarded – undo
220 220
         return self::$commandSets->if()->ifVarEqualsNumber($variable, $number);
221 221
     }
222 222
 
223
-    public static function ifEndsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_EndsWith
223
+    public static function ifEndsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_EndsWith
224 224
     {
225 225
         return self::$commandSets->if()->ifEndsWith($variable, $search, $caseInsensitive);
226 226
     }
227 227
 
228
-    public static function elseIfBeginsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_BeginsWith
228
+    public static function elseIfBeginsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_BeginsWith
229 229
     {
230 230
         return self::$commandSets->elseIf()->elseIfBeginsWith($variable, $search, $caseInsensitive);
231 231
     }
232 232
     
233
-    public static function elseIfEndsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_EndsWith
233
+    public static function elseIfEndsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_EndsWith
234 234
     {
235 235
         return self::$commandSets->elseIf()->elseIfEndsWith($variable, $search, $caseInsensitive);
236 236
     }
237 237
     
238
-    public static function ifContains(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains
238
+    public static function ifContains(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_Contains
239 239
     {
240 240
         return self::$commandSets->if()->ifContains($variable, array($search), $caseInsensitive);
241 241
     }
@@ -263,12 +263,12 @@  discard block
 block discarded – undo
263 263
     * @param bool $caseInsensitive
264 264
     * @return Mailcode_Commands_Command_If_Contains
265 265
     */
266
-    public static function ifContainsAny(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains
266
+    public static function ifContainsAny(string $variable, array $searchTerms, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_Contains
267 267
     {
268 268
         return self::$commandSets->if()->ifContains($variable, $searchTerms, $caseInsensitive);
269 269
     }
270 270
     
271
-    public static function elseIfContains(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains
271
+    public static function elseIfContains(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_Contains
272 272
     {
273 273
         return self::$commandSets->elseIf()->elseIfContains($variable, array($search), $caseInsensitive);
274 274
     }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     * @param bool $caseInsensitive
282 282
     * @return Mailcode_Commands_Command_ElseIf_Contains
283 283
     */
284
-    public static function elseIfContainsAny(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains
284
+    public static function elseIfContainsAny(string $variable, array $searchTerms, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_Contains
285 285
     {
286 286
         return self::$commandSets->elseIf()->elseIfContains($variable, $searchTerms, $caseInsensitive);
287 287
     }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
         return self::$commandSets->if()->ifNotEmpty($variable);
297 297
     }
298 298
     
299
-    public static function for(string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For
299
+    public static function for (string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For
300 300
     {
301 301
         return self::$commandSets->misc()->for($sourceVariable, $loopVariable);
302 302
     }
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
     public static function init() : void
338 338
     {
339
-        if(!isset(self::$commandSets))
339
+        if (!isset(self::$commandSets))
340 340
         {
341 341
             self::$commandSets = new Mailcode_Factory_CommandSets();
342 342
         }
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement/Info.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $operand = $this->getOperandByIndex(1);
49 49
         $value = $this->getTokenByIndex(2);
50 50
         
51
-        if($variable && $operand && $value && $operand->isAssignment())
51
+        if ($variable && $operand && $value && $operand->isAssignment())
52 52
         {
53 53
             return true;
54 54
         }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $operand = $this->getOperandByIndex(1);
68 68
         $value = $this->getTokenByIndex(2);
69 69
         
70
-        if($variable && $operand && $value && $operand->isComparator())
70
+        if ($variable && $operand && $value && $operand->isComparator())
71 71
         {
72 72
             return true;
73 73
         }
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $result = array();
86 86
         
87
-        foreach($this->tokens as $token)
87
+        foreach ($this->tokens as $token)
88 88
         {
89
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
89
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
90 90
             {
91 91
                 $result[] = $token->getVariable();
92 92
             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $token = $this->getTokenByIndex($index);
109 109
         
110
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
110
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
111 111
         {
112 112
             return $token;
113 113
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $token = $this->getTokenByIndex($index);
129 129
         
130
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
130
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
131 131
         {
132 132
             return $token;
133 133
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     {
148 148
         $token = $this->getTokenByIndex($index);
149 149
         
150
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
150
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
151 151
         {
152 152
             return $token;
153 153
         }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     {
168 168
         $token = $this->getTokenByIndex($index);
169 169
         
170
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
170
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
171 171
         {
172 172
             return $token;
173 173
         }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     */
186 186
     public function getTokenByIndex(int $index) : ?Mailcode_Parser_Statement_Tokenizer_Token
187 187
     {
188
-        if(isset($this->tokens[$index]))
188
+        if (isset($this->tokens[$index]))
189 189
         {
190 190
             return $this->tokens[$index];
191 191
         }
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
     {
216 216
         $result = array();
217 217
         
218
-        foreach($this->tokens as $token)
218
+        foreach ($this->tokens as $token)
219 219
         {
220
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
220
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
221 221
             {
222 222
                 $result[] = $token;
223 223
             }
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
     {
239 239
         $result = array();
240 240
 
241
-        foreach($this->tokens as $token)
241
+        foreach ($this->tokens as $token)
242 242
         {
243
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
243
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
244 244
             {
245 245
                 $result[] = $token;
246 246
             }
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 
256 256
         foreach ($keywords as $keyword)
257 257
         {
258
-            if($keyword->isURLEncoded())
258
+            if ($keyword->isURLEncoded())
259 259
             {
260 260
                 return true;
261 261
             }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
     public function addURLEncoding() : Mailcode_Parser_Statement_Info
285 285
     {
286
-        if(!$this->hasURLEncoding())
286
+        if (!$this->hasURLEncoding())
287 287
         {
288 288
             $this->tokenizer->appendKeyword('urlencode');
289 289
             $this->tokens = $this->tokenizer->getTokens();
Please login to merge, or discard this patch.