Passed
Push — master ( 1c67eb...daf615 )
by Sebastian
02:12
created
src/Mailcode/Factory.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
     * 
62 62
     * @see Mailcode_Factory::ERROR_INVALID_COMMAND_CREATED
63 63
     */
64
-    public static function setVar(string $variableName, string $value, bool $quoteValue=true) : Mailcode_Commands_Command_SetVariable
64
+    public static function setVar(string $variableName, string $value, bool $quoteValue = true) : Mailcode_Commands_Command_SetVariable
65 65
     {
66 66
         $variableName = self::_filterVariableName($variableName);
67 67
         
68
-        if($quoteValue)
68
+        if ($quoteValue)
69 69
         {
70 70
             $value = self::_quoteString($value);
71 71
         }
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
         return $cmd;
139 139
     }
140 140
     
141
-    protected static function _buildIf(string $cmd, string $condition, string $type='') : Mailcode_Commands_Command
141
+    protected static function _buildIf(string $cmd, string $condition, string $type = '') : Mailcode_Commands_Command
142 142
     {
143 143
         $stringType = $type;
144 144
         
145
-        if(!empty($type))
145
+        if (!empty($type))
146 146
         {
147 147
             $stringType = ' '.$type;
148 148
         }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
         return $cmd;
166 166
     }
167 167
   
168
-    protected static function _buildIfVar(string $cmd, string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command
168
+    protected static function _buildIfVar(string $cmd, string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command
169 169
     {
170
-        if($quoteValue)
170
+        if ($quoteValue)
171 171
         {
172 172
             $value = self::_quoteString($value);
173 173
         }
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
         return self::_buildIf($cmd, $condition, 'variable');
183 183
     }
184 184
     
185
-    public static function if(string $condition, string $type='') : Mailcode_Commands_Command_If
185
+    public static function if (string $condition, string $type = '') : Mailcode_Commands_Command_If
186 186
     {
187 187
         $cmd = self::_buildIf('If', $condition, $type);
188 188
         
189
-        if($cmd instanceof Mailcode_Commands_Command_If)
189
+        if ($cmd instanceof Mailcode_Commands_Command_If)
190 190
         {
191 191
             return $cmd;
192 192
         }
@@ -194,11 +194,11 @@  discard block
 block discarded – undo
194 194
         throw self::_exceptionUnexpectedType($cmd);
195 195
     }
196 196
     
197
-    public static function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If
197
+    public static function ifVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If
198 198
     {
199 199
         $cmd = self::_buildIfVar('If', $variable, $operand, $value, $quoteValue);
200 200
         
201
-        if($cmd instanceof Mailcode_Commands_Command_If)
201
+        if ($cmd instanceof Mailcode_Commands_Command_If)
202 202
         {
203 203
             return $cmd;
204 204
         }
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $cmd = self::_buildIfVar('If', $variable, $operand, $value, true);
212 212
         
213
-        if($cmd instanceof Mailcode_Commands_Command_If)
213
+        if ($cmd instanceof Mailcode_Commands_Command_If)
214 214
         {
215 215
             return $cmd;
216 216
         }
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
         throw self::_exceptionUnexpectedType($cmd);
219 219
     }
220 220
     
221
-    public static function ifVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If
221
+    public static function ifVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If
222 222
     {
223 223
         $cmd = self::_buildIfVar('If', $variable, '==', $value, $quoteValue);
224 224
         
225
-        if($cmd instanceof Mailcode_Commands_Command_If)
225
+        if ($cmd instanceof Mailcode_Commands_Command_If)
226 226
         {
227 227
             return $cmd;
228 228
         }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     {
235 235
         $cmd = self::_buildIfVar('If', $variable, '==', $value, true);
236 236
         
237
-        if($cmd instanceof Mailcode_Commands_Command_If)
237
+        if ($cmd instanceof Mailcode_Commands_Command_If)
238 238
         {
239 239
             return $cmd;
240 240
         }
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
         throw self::_exceptionUnexpectedType($cmd);
243 243
     }
244 244
     
245
-    public static function ifVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If
245
+    public static function ifVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If
246 246
     {
247 247
         $cmd = self::_buildIfVar('If', $variable, '!=', $value, $quoteValue);
248 248
         
249
-        if($cmd instanceof Mailcode_Commands_Command_If)
249
+        if ($cmd instanceof Mailcode_Commands_Command_If)
250 250
         {
251 251
             return $cmd;
252 252
         }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $cmd = self::_buildIfVar('If', $variable, '!=', $value, true);
260 260
         
261
-        if($cmd instanceof Mailcode_Commands_Command_If)
261
+        if ($cmd instanceof Mailcode_Commands_Command_If)
262 262
         {
263 263
             return $cmd;
264 264
         }
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
         throw self::_exceptionUnexpectedType($cmd);
267 267
     }
268 268
     
269
-    public static function elseIf(string $condition, string $type='') : Mailcode_Commands_Command_ElseIf
269
+    public static function elseIf (string $condition, string $type = '') : Mailcode_Commands_Command_ElseIf
270 270
     {
271 271
         $cmd = self::_buildIf('ElseIf', $condition, $type);
272 272
         
273
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
273
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
274 274
         {
275 275
             return $cmd;
276 276
         }
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
         throw self::_exceptionUnexpectedType($cmd);
279 279
     }
280 280
     
281
-    public static function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf
281
+    public static function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf
282 282
     {
283 283
         $cmd = self::_buildIfVar('ElseIf', $variable, $operand, $value, $quoteValue);
284 284
         
285
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
285
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
286 286
         {
287 287
             return $cmd;
288 288
         }
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     {
295 295
         $cmd = self::_buildIfVar('ElseIf', $variable, $operand, $value, true);
296 296
         
297
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
297
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
298 298
         {
299 299
             return $cmd;
300 300
         }
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
         throw self::_exceptionUnexpectedType($cmd);
303 303
     }
304 304
     
305
-    public static function elseIfVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf
305
+    public static function elseIfVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf
306 306
     {
307 307
         $cmd = self::_buildIfVar('ElseIf', $variable, '==', $value, $quoteValue);
308 308
         
309
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
309
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
310 310
         {
311 311
             return $cmd;
312 312
         }
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     {
319 319
         $cmd = self::_buildIfVar('ElseIf', $variable, '==', $value, true);
320 320
         
321
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
321
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
322 322
         {
323 323
             return $cmd;
324 324
         }
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
         throw self::_exceptionUnexpectedType($cmd);
327 327
     }
328 328
     
329
-    public static function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf
329
+    public static function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf
330 330
     {
331 331
         $cmd = self::_buildIfVar('ElseIf', $variable, '!=', $value, $quoteValue);
332 332
         
333
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
333
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
334 334
         {
335 335
             return $cmd;
336 336
         }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     {
343 343
         $cmd = self::_buildIfVar('ElseIf', $variable, '!=', $value, true);
344 344
         
345
-        if($cmd instanceof Mailcode_Commands_Command_ElseIf)
345
+        if ($cmd instanceof Mailcode_Commands_Command_ElseIf)
346 346
         {
347 347
             return $cmd;
348 348
         }
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     
369 369
     protected static function _checkCommand(Mailcode_Commands_Command $command) : void
370 370
     {
371
-        if($command->isValid())
371
+        if ($command->isValid())
372 372
         {
373 373
             return;
374 374
         }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     */
80 80
     protected $comment = '';
81 81
     
82
-    public function __construct(string $type='', string $paramsString='', string $matchedText='')
82
+    public function __construct(string $type = '', string $paramsString = '', string $matchedText = '')
83 83
     {
84 84
         $this->type = $type;
85 85
         $this->paramsString = $paramsString;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $this->requireNonDummy();
152 152
         
153
-        if($this->hash === '') {
153
+        if ($this->hash === '') {
154 154
             $this->hash = md5($this->matchedText);
155 155
         }
156 156
         
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     
160 160
     protected function requireNonDummy() : void
161 161
     {
162
-        if(!$this->isDummy())
162
+        if (!$this->isDummy())
163 163
         {
164 164
             return;
165 165
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     {
181 181
         $this->requireNonDummy();
182 182
         
183
-        if(isset($this->validationResult)) 
183
+        if (isset($this->validationResult)) 
184 184
         {
185 185
             return $this->validationResult;
186 186
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     
195 195
     public function getValidationResult() :  \AppUtils\OperationResult
196 196
     {
197
-        if(isset($this->validationResult)) 
197
+        if (isset($this->validationResult)) 
198 198
         {
199 199
             return $this->validationResult;
200 200
         }
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
     {
211 211
         $validations = array_merge($this->validations, $this->getValidations());
212 212
         
213
-        foreach($validations as $validation)
213
+        foreach ($validations as $validation)
214 214
         {
215 215
             $method = 'validateSyntax_'.$validation;
216 216
             
217
-            if(!method_exists($this, $method))
217
+            if (!method_exists($this, $method))
218 218
             {
219 219
                 throw new Mailcode_Exception(
220 220
                     'Missing validation method',
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             $this->$method();
231 231
             
232 232
             // break off at the first validation issue
233
-            if(!$this->validationResult->isValid())
233
+            if (!$this->validationResult->isValid())
234 234
             {
235 235
                 return;
236 236
             }
@@ -244,12 +244,12 @@  discard block
 block discarded – undo
244 244
     
245 245
     protected function validateSyntax_params() : void
246 246
     {
247
-        if(!$this->requiresParameters())
247
+        if (!$this->requiresParameters())
248 248
         {
249 249
             return;
250 250
         }
251 251
         
252
-        if(empty($this->paramsString))
252
+        if (empty($this->paramsString))
253 253
         {
254 254
             $this->validationResult->makeError(
255 255
                 t('Parameters have to be specified.'),
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         
261 261
         $this->params = $this->mailcode->getParser()->createStatement($this->paramsString);
262 262
         
263
-        if(!$this->params->isValid())
263
+        if (!$this->params->isValid())
264 264
         {
265 265
             $error = $this->params->getValidationResult();
266 266
             
@@ -273,14 +273,14 @@  discard block
 block discarded – undo
273 273
     
274 274
     protected function validateSyntax_type_supported() : void
275 275
     {
276
-        if(!$this->supportsType() || empty($this->type))
276
+        if (!$this->supportsType() || empty($this->type))
277 277
         {
278 278
             return;
279 279
         }
280 280
         
281 281
         $types = $this->getSupportedTypes();
282 282
 
283
-        if(!in_array($this->type, $types))
283
+        if (!in_array($this->type, $types))
284 284
         {
285 285
             $this->validationResult->makeError(
286 286
                 t('The command addon %1$s is not supported.', $this->type).' '.
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     
295 295
     protected function validateSyntax_type_unsupported() : void
296 296
     {
297
-        if($this->supportsType() || empty($this->type))
297
+        if ($this->supportsType() || empty($this->type))
298 298
         {
299 299
             return;
300 300
         }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     
313 313
     public function getType() : string
314 314
     {
315
-        if($this->supportsType())
315
+        if ($this->supportsType())
316 316
         {
317 317
             return $this->type;
318 318
         }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     
333 333
     public function getHighlighted() : string
334 334
     {
335
-        if(!$this->isValid())
335
+        if (!$this->isValid())
336 336
         {
337 337
             return '';
338 338
         }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
     
344 344
     public function getParamsString() : string
345 345
     {
346
-        if($this->requiresParameters())
346
+        if ($this->requiresParameters())
347 347
         {
348 348
             return $this->paramsString;
349 349
         }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
     
371 371
     public function getNormalized() : string
372 372
     {
373
-        if(!$this->isValid())
373
+        if (!$this->isValid())
374 374
         {
375 375
             return '';
376 376
         }
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
         $parts = array();
379 379
         $parts[] = '{'.$this->getName();
380 380
         
381
-        if($this->supportsType() && $this->hasType())
381
+        if ($this->supportsType() && $this->hasType())
382 382
         {
383 383
             $parts[] = ' '.$this->getType();
384 384
         }
385 385
         
386
-        if($this->requiresParameters() && isset($this->params))
386
+        if ($this->requiresParameters() && isset($this->params))
387 387
         {
388 388
             $parts[] = ': ';
389 389
             $parts[] = $this->params->getNormalized();
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     */
116 116
     public function setDelimiter(string $delimiter) : Mailcode_Parser_Safeguard
117 117
     {
118
-        if(empty($delimiter))
118
+        if (empty($delimiter))
119 119
         {
120 120
             throw new Mailcode_Exception(
121 121
                 'Empty delimiter',
@@ -156,17 +156,17 @@  discard block
 block discarded – undo
156 156
     * @param bool $highlighted
157 157
     * @return string[]string
158 158
     */
159
-    protected function getReplaces(bool $highlighted=false) : array
159
+    protected function getReplaces(bool $highlighted = false) : array
160 160
     {
161 161
         $placeholders = $this->getPlaceholders();
162 162
         
163 163
         $replaces = array();
164 164
         
165
-        foreach($placeholders as $placeholder)
165
+        foreach ($placeholders as $placeholder)
166 166
         {
167 167
             $replace = '';
168 168
             
169
-            if($highlighted)
169
+            if ($highlighted)
170 170
             {
171 171
                 $replace = $placeholder->getHighlightedText();
172 172
             }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     */
191 191
     public function getPlaceholders()
192 192
     {
193
-        if(isset($this->placeholders))
193
+        if (isset($this->placeholders))
194 194
         {
195 195
             return $this->placeholders;
196 196
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         
200 200
         $cmds = $this->getCollection()->getGroupedByHash();
201 201
         
202
-        foreach($cmds as $command)
202
+        foreach ($cmds as $command)
203 203
         {
204 204
             self::$counter++;
205 205
             
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         return $this->placeholders;
214 214
     }
215 215
     
216
-    protected function restore(string $string, bool $highlighted=false) : string
216
+    protected function restore(string $string, bool $highlighted = false) : string
217 217
     {
218 218
         $this->requireValidCollection();
219 219
         
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
         
222 222
         $placeholderStrings = array_keys($replaces);
223 223
         
224
-        foreach($placeholderStrings as $search)
224
+        foreach ($placeholderStrings as $search)
225 225
         {
226
-            if(!strstr($string, $search))
226
+            if (!strstr($string, $search))
227 227
             {
228 228
                 throw new Mailcode_Exception(
229 229
                     'Command placeholder not found',
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     */
282 282
     public function getCollection() : Mailcode_Collection
283 283
     {
284
-        if(isset($this->collection))
284
+        if (isset($this->collection))
285 285
         {
286 286
             return $this->collection;
287 287
         }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     */
304 304
     protected function requireValidCollection() : void
305 305
     {
306
-        if($this->getCollection()->isValid())
306
+        if ($this->getCollection()->isValid())
307 307
         {
308 308
             return;
309 309
         }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     */
326 326
     public function getPlaceholderStrings() : array
327 327
     {
328
-        if(isset($this->placeholderStrings))
328
+        if (isset($this->placeholderStrings))
329 329
         {
330 330
             return $this->placeholderStrings;
331 331
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         
335 335
         $this->placeholderStrings = array();
336 336
         
337
-        foreach($placeholders as $placeholder)
337
+        foreach ($placeholders as $placeholder)
338 338
         {
339 339
             $this->placeholderStrings[] = $placeholder->getReplacementText();
340 340
         }
@@ -360,9 +360,9 @@  discard block
 block discarded – undo
360 360
     {
361 361
         $placeholders = $this->getPlaceholders();
362 362
         
363
-        foreach($placeholders as $placeholder)
363
+        foreach ($placeholders as $placeholder)
364 364
         {
365
-            if($placeholder->getID() === $id)
365
+            if ($placeholder->getID() === $id)
366 366
             {
367 367
                 return $placeholder;
368 368
             }
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
     {
390 390
         $placeholders = $this->getPlaceholders();
391 391
         
392
-        foreach($placeholders as $placeholder)
392
+        foreach ($placeholders as $placeholder)
393 393
         {
394
-            if($placeholder->getReplacementText() === $string)
394
+            if ($placeholder->getReplacementText() === $string)
395 395
             {
396 396
                 return $placeholder;
397 397
             }
Please login to merge, or discard this patch.
src/Mailcode/Collection.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         
98 98
         $errors = $this->errors;
99 99
         
100
-        if(!$result->isValid())
100
+        if (!$result->isValid())
101 101
         {
102 102
             $errors[] = new Mailcode_Collection_Error_Message(
103 103
                 '',
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $hashes = array();
141 141
         
142
-        foreach($this->commands as $command)
142
+        foreach ($this->commands as $command)
143 143
         {
144 144
             $hash = $command->getHash();
145 145
             
146
-            if(!isset($hashes[$hash]))
146
+            if (!isset($hashes[$hash]))
147 147
             {
148 148
                 $hashes[$hash] = $command;
149 149
             }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     */
161 161
     public function addCommands(array $commands) : Mailcode_Collection
162 162
     {
163
-        foreach($commands as $command)
163
+        foreach ($commands as $command)
164 164
         {
165 165
             $this->addCommand($command);
166 166
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     {
180 180
         $collection = new Mailcode_Variables_Collection_Regular();
181 181
         
182
-        foreach($this->commands as $command)
182
+        foreach ($this->commands as $command)
183 183
         {
184 184
             $collection->mergeWith($command->getVariables());
185 185
         }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     
190 190
     public function getValidationResult() : OperationResult
191 191
     {
192
-        if(isset($this->validationResult))
192
+        if (isset($this->validationResult))
193 193
         {
194 194
             return $this->validationResult;
195 195
         }
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $errors = $this->getErrors();
207 207
         
208
-        foreach($errors as $error)
208
+        foreach ($errors as $error)
209 209
         {
210
-            if($error->getCode() === $code)
210
+            if ($error->getCode() === $code)
211 211
             {
212 212
                 return true;
213 213
             }
@@ -225,9 +225,9 @@  discard block
 block discarded – undo
225 225
     {
226 226
         $result = array();
227 227
         
228
-        foreach($this->commands as $command)
228
+        foreach ($this->commands as $command)
229 229
         {
230
-            if($command instanceof Mailcode_Commands_Command_ShowVariable)
230
+            if ($command instanceof Mailcode_Commands_Command_ShowVariable)
231 231
             {
232 232
                 $result[] = $command;
233 233
             }
Please login to merge, or discard this patch.
src/Mailcode/Renderer.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     * @param bool $highlighted
33 33
     * @return Mailcode_Renderer
34 34
     */
35
-    public function setOutputHighlighted(bool $highlighted=true) : Mailcode_Renderer
35
+    public function setOutputHighlighted(bool $highlighted = true) : Mailcode_Renderer
36 36
     {
37 37
         $this->highlighted = $highlighted;
38 38
         
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         return $this->command2string(Mailcode_Factory::setVarString($variableName, $value));
61 61
     }
62 62
     
63
-    public function if(string $condition, string $type='') : string
63
+    public function if (string $condition, string $type = '') : string
64 64
     {
65
-        return $this->command2string(Mailcode_Factory::if($condition, $type));
65
+        return $this->command2string(Mailcode_Factory::if ($condition, $type));
66 66
     }
67 67
     
68 68
     public function ifVar(string $variable, string $operand, string $value, bool $quoteValue) : string
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         return $this->command2string(Mailcode_Factory::ifVarNotEqualsString($variable, $value));
96 96
     }
97 97
     
98
-    public function elseIf(string $condition, string $type='') : string
98
+    public function elseIf (string $condition, string $type = '') : string
99 99
     {
100
-        return $this->command2string(Mailcode_Factory::elseIf($condition, $type));
100
+        return $this->command2string(Mailcode_Factory::elseIf ($condition, $type));
101 101
     }
102 102
     
103 103
     public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue) : string
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     
148 148
     protected function command2string(Mailcode_Commands_Command $command) : string
149 149
     {
150
-        if($this->highlighted)
150
+        if ($this->highlighted)
151 151
         {
152 152
             return $command->getHighlighted();
153 153
         }
Please login to merge, or discard this patch.