Test Failed
Push — master ( 9ff364...742ef2 )
by Sebastian
03:58
created
src/Mailcode/Parser/Statement/Tokenizer/Token/StringLiteral.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -35,31 +35,31 @@
 block discarded – undo
35 35
     }
36 36
 
37 37
     /**
38
-    * Retrieves the text with the surrounding quotes,
39
-    * and special characters escaped for Mailcode.
40
-    *
41
-    * @return string
42
-    */
38
+     * Retrieves the text with the surrounding quotes,
39
+     * and special characters escaped for Mailcode.
40
+     *
41
+     * @return string
42
+     */
43 43
     public function getNormalized() : string
44 44
     {
45 45
         return '"'.SpecialChars::escape($this->text).'"';
46 46
     }
47 47
     
48
-   /**
49
-    * Retrieves the text with the surrounding quotes.
50
-    * @return string
51
-    */
48
+    /**
49
+     * Retrieves the text with the surrounding quotes.
50
+     * @return string
51
+     */
52 52
     public function getValue() : string
53 53
     {
54 54
         return $this->getNormalized();
55 55
     }
56 56
     
57
-   /**
58
-    * Retrieves the text without the surrounding quotes,
59
-    * and special Mailcode characters not escaped.
60
-    *
61
-    * @return string
62
-    */
57
+    /**
58
+     * Retrieves the text without the surrounding quotes,
59
+     * and special Mailcode characters not escaped.
60
+     *
61
+     * @return string
62
+     */
63 63
     public function getText() : string
64 64
     {
65 65
         return SpecialChars::decode($this->text);
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement/Tokenizer.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
         Mailcode_Parser_Statement_Tokenizer_Process_ExtractTokens::class
42 42
     );
43 43
     
44
-   /**
45
-    * @var Mailcode_Parser_Statement
46
-    */
44
+    /**
45
+     * @var Mailcode_Parser_Statement
46
+     */
47 47
     protected Mailcode_Parser_Statement $statement;
48 48
     
49
-   /**
50
-    * @var string
51
-    */
49
+    /**
50
+     * @var string
51
+     */
52 52
     protected string $tokenized = '';
53 53
     
54 54
     /**
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected array $tokensOrdered = array();
58 58
     
59
-   /**
60
-    * @var string[]
61
-    */
59
+    /**
60
+     * @var string[]
61
+     */
62 62
     protected static array $ids = array();
63 63
 
64 64
     /**
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
         return $this->statement->getSourceCommand();
79 79
     }
80 80
 
81
-   /**
82
-    * Retrieves all tokens detected in the statement string, in 
83
-    * the order they were found.
84
-    * 
85
-    * @return Mailcode_Parser_Statement_Tokenizer_Token[]
86
-    */
81
+    /**
82
+     * Retrieves all tokens detected in the statement string, in 
83
+     * the order they were found.
84
+     * 
85
+     * @return Mailcode_Parser_Statement_Tokenizer_Token[]
86
+     */
87 87
     public function getTokens() : array
88 88
     {
89 89
         return $this->tokensOrdered;
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
         return !empty($this->tokensOrdered);
95 95
     }
96 96
     
97
-   /**
98
-    * Whether there were any unknown tokens in the statement.
99
-    * 
100
-    * @return bool
101
-    */
97
+    /**
98
+     * Whether there were any unknown tokens in the statement.
99
+     * 
100
+     * @return bool
101
+     */
102 102
     public function hasUnknown() : bool
103 103
     {
104 104
         $unknown = $this->getUnknown();
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
         return !empty($unknown);
107 107
     }
108 108
     
109
-   /**
110
-    * Retrieves all unknown content tokens, if any.
111
-    * 
112
-    * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[]
113
-    */
109
+    /**
110
+     * Retrieves all unknown content tokens, if any.
111
+     * 
112
+     * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[]
113
+     */
114 114
     public function getUnknown() : array
115 115
     {
116 116
         $result = array();
@@ -313,13 +313,13 @@  discard block
 block discarded – undo
313 313
         return $token;
314 314
     }
315 315
     
316
-   /**
317
-    * Generates a unique alphabet-based ID without numbers
318
-    * to use as token name, to avoid conflicts with the
319
-    * numbers detection.
320
-    *
321
-    * @return string
322
-    */
316
+    /**
317
+     * Generates a unique alphabet-based ID without numbers
318
+     * to use as token name, to avoid conflicts with the
319
+     * numbers detection.
320
+     *
321
+     * @return string
322
+     */
323 323
     protected function generateID() : string
324 324
     {
325 325
         static $alphas;
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $result = array();
117 117
         
118
-        foreach($this->tokensOrdered as $token)
118
+        foreach ($this->tokensOrdered as $token)
119 119
         {
120
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Unknown)
120
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Unknown)
121 121
             {
122 122
                 $result[] = $token;
123 123
             }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $unknown = $this->getUnknown();
132 132
         
133
-        if(!empty($unknown))
133
+        if (!empty($unknown))
134 134
         {
135 135
             return array_shift($unknown);
136 136
         }
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $parts = array();
144 144
         
145
-        foreach($this->tokensOrdered as $token)
145
+        foreach ($this->tokensOrdered as $token)
146 146
         {
147 147
             $string = $token->getNormalized();
148 148
             
149
-            if($string !== '')
149
+            if ($string !== '')
150 150
             {
151 151
                 $parts[] = $string;
152 152
             }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $statement = trim($statement);
172 172
         $tokens = array();
173 173
 
174
-        foreach($this->tokenClasses as $tokenClass)
174
+        foreach ($this->tokenClasses as $tokenClass)
175 175
         {
176 176
             $processor = $this->createProcessor($tokenClass, $statement, $tokens);
177 177
             $processor->process();
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     {
196 196
         $instance = new $className($this, $statement, $tokens);
197 197
 
198
-        if($instance instanceof Mailcode_Parser_Statement_Tokenizer_Process)
198
+        if ($instance instanceof Mailcode_Parser_Statement_Tokenizer_Process)
199 199
         {
200 200
             return $instance;
201 201
         }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      * @param mixed $subject
217 217
      * @return Mailcode_Parser_Statement_Tokenizer_Token
218 218
      */
219
-    public function createToken(string $type, string $matchedText, $subject=null) : Mailcode_Parser_Statement_Tokenizer_Token
219
+    public function createToken(string $type, string $matchedText, $subject = null) : Mailcode_Parser_Statement_Tokenizer_Token
220 220
     {
221 221
         $tokenID = $this->generateID();
222 222
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
         $token = new $class($tokenID, $matchedText, $subject, $this->getSourceCommand());
226 226
 
227
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token)
227
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token)
228 228
         {
229 229
             return $token;
230 230
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         $token = $this->appendToken('Keyword', $name);
247 247
 
248
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
248
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
249 249
         {
250 250
             return $token;
251 251
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             SpecialChars::encodeAll($text)
265 265
         );
266 266
 
267
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
267
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
268 268
         {
269 269
             return $token;
270 270
         }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
         foreach ($this->tokensOrdered as $checkToken)
285 285
         {
286
-            if($checkToken->getID() !== $tokenID)
286
+            if ($checkToken->getID() !== $tokenID)
287 287
             {
288 288
                 $keep[] = $checkToken;
289 289
             }
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      * @param mixed $subject
303 303
      * @return Mailcode_Parser_Statement_Tokenizer_Token
304 304
      */
305
-    protected function appendToken(string $type, string $matchedText, $subject=null) : Mailcode_Parser_Statement_Tokenizer_Token
305
+    protected function appendToken(string $type, string $matchedText, $subject = null) : Mailcode_Parser_Statement_Tokenizer_Token
306 306
     {
307 307
         $token = $this->createToken($type, $matchedText, $subject);
308 308
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
     {
325 325
         static $alphas;
326 326
 
327
-        if(!isset($alphas))
327
+        if (!isset($alphas))
328 328
         {
329 329
             $alphas = range('A', 'Z');
330 330
         }
@@ -333,12 +333,12 @@  discard block
 block discarded – undo
333 333
 
334 334
         $result = '';
335 335
 
336
-        for($i=0; $i < $amount; $i++)
336
+        for ($i = 0; $i < $amount; $i++)
337 337
         {
338 338
             $result .= $alphas[array_rand($alphas)];
339 339
         }
340 340
 
341
-        if(!in_array($result, self::$ids))
341
+        if (!in_array($result, self::$ids))
342 342
         {
343 343
             self::$ids[] = $result;
344 344
             return $result;
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement/Info/Keywords.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     {
44 44
         $token = $this->info->getTokenByIndex($index);
45 45
 
46
-        if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
46
+        if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
47 47
         {
48 48
             return $token;
49 49
         }
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $tokens = $this->getAll();
64 64
 
65
-        foreach($tokens as $token)
65
+        foreach ($tokens as $token)
66 66
         {
67
-            if($token->getKeyword() === $name)
67
+            if ($token->getKeyword() === $name)
68 68
             {
69 69
                 return $token;
70 70
             }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
         $result = array();
82 82
         $tokens = $this->info->getTokens();
83 83
 
84
-        foreach($tokens as $token)
84
+        foreach ($tokens as $token)
85 85
         {
86
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
86
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
87 87
             {
88 88
                 $result[] = $token;
89 89
             }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function setEnabled(string $keyword, bool $enabled) : Mailcode_Parser_Statement_Info_Keywords
104 104
     {
105
-        if($enabled)
105
+        if ($enabled)
106 106
         {
107 107
             return $this->add($keyword);
108 108
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $keyword = rtrim($keyword, ':').':';
123 123
 
124
-        if(!$this->hasKeyword($keyword))
124
+        if (!$this->hasKeyword($keyword))
125 125
         {
126 126
             $this->tokenizer->appendKeyword($keyword);
127 127
         }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         foreach ($keywords as $kw)
168 168
         {
169
-            if($kw->getKeyword() === $keyword)
169
+            if ($kw->getKeyword() === $keyword)
170 170
             {
171 171
                 return true;
172 172
             }
Please login to merge, or discard this patch.
src/Mailcode/Parser/StringPreProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     private function stripStyleTags() : void
81 81
     {
82
-        if(!ConvertHelper::isStringHTML($this->subject))
82
+        if (!ConvertHelper::isStringHTML($this->subject))
83 83
         {
84 84
             return;
85 85
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
     private function escapeRegexBracketMatch(string $subject, string $needle) : string
95 95
     {
96
-        $replacement =  str_replace(
96
+        $replacement = str_replace(
97 97
             array('{', '}'),
98 98
             array('\{', '\}'),
99 99
             $needle
Please login to merge, or discard this patch.
src/Mailcode/Factory/Instantiator.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
  */
23 23
 class Mailcode_Factory_Instantiator
24 24
 {
25
-    public function buildIf(string $ifType, string $params, string $type='') : Mailcode_Commands_IfBase
25
+    public function buildIf(string $ifType, string $params, string $type = '') : Mailcode_Commands_IfBase
26 26
     {
27 27
         $stringType = $type;
28 28
         
29
-        if(!empty($type))
29
+        if (!empty($type))
30 30
         {
31 31
             $stringType = ' '.$type;
32 32
         }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         
46 46
         $this->checkCommand($command);
47 47
         
48
-        if($command instanceof Mailcode_Commands_IfBase)
48
+        if ($command instanceof Mailcode_Commands_IfBase)
49 49
         {
50 50
             return $command;
51 51
         }
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
         throw $this->exceptionUnexpectedType('IfBase', $command);
54 54
     }
55 55
     
56
-    public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue=false, bool $insensitive=false) : Mailcode_Commands_IfBase
56
+    public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue = false, bool $insensitive = false) : Mailcode_Commands_IfBase
57 57
     {
58 58
         $variable = $this->filterVariableName($variable);
59 59
 
60
-        if($insensitive)
60
+        if ($insensitive)
61 61
         {
62 62
             $value = mb_strtolower($value);
63 63
         }
64 64
 
65
-        if($quoteValue)
65
+        if ($quoteValue)
66 66
         {
67 67
             $value = $this->quoteString($value);
68 68
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $value
75 75
         );
76 76
 
77
-        if($insensitive)
77
+        if ($insensitive)
78 78
         {
79 79
             $condition .= ' '.Mailcode_Commands_Keywords::TYPE_INSENSITIVE;
80 80
         }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @return Mailcode_Commands_IfBase
103 103
      * @throws Mailcode_Factory_Exception
104 104
      */
105
-    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, bool $regexEnabled=false, string $containsType='contains') : Mailcode_Commands_IfBase
105
+    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, bool $regexEnabled = false, string $containsType = 'contains') : Mailcode_Commands_IfBase
106 106
     {
107 107
         $condition = sprintf(
108 108
             '%s%s"%s"',
@@ -114,23 +114,23 @@  discard block
 block discarded – undo
114 114
         return $this->buildIf($ifType, $condition, $containsType);
115 115
     }
116 116
 
117
-    private function renderListKeywords(bool $caseInsensitive=false, bool $regexEnabled=false) : string
117
+    private function renderListKeywords(bool $caseInsensitive = false, bool $regexEnabled = false) : string
118 118
     {
119 119
         $keywords = array();
120 120
 
121
-        if($caseInsensitive)
121
+        if ($caseInsensitive)
122 122
         {
123 123
             $keywords[] = Mailcode_Commands_Keywords::TYPE_INSENSITIVE;
124 124
         }
125 125
 
126
-        if($regexEnabled)
126
+        if ($regexEnabled)
127 127
         {
128 128
             $keywords[] = Mailcode_Commands_Keywords::TYPE_REGEX;
129 129
         }
130 130
 
131 131
         $keywordsString = '';
132 132
 
133
-        if(!empty($keywords))
133
+        if (!empty($keywords))
134 134
         {
135 135
             $keywordsString = ' '.implode(' ', $keywords);
136 136
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @return Mailcode_Commands_IfBase
148 148
      * @throws Mailcode_Factory_Exception
149 149
      */
150
-    public function buildIfNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, bool $regexEnabled=false) : Mailcode_Commands_IfBase
150
+    public function buildIfNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, bool $regexEnabled = false) : Mailcode_Commands_IfBase
151 151
     {
152 152
         return $this->buildIfContains($ifType, $variable, $searchTerms, $caseInsensitive, $regexEnabled, 'not-contains');
153 153
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @return Mailcode_Commands_IfBase
163 163
      * @throws Mailcode_Factory_Exception
164 164
      */
165
-    public function buildIfListContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, bool $regexEnabled=false, string $containsType='list-contains') : Mailcode_Commands_IfBase
165
+    public function buildIfListContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, bool $regexEnabled = false, string $containsType = 'list-contains') : Mailcode_Commands_IfBase
166 166
     {
167 167
         return $this->buildIfContains($ifType, $variable, $searchTerms, $caseInsensitive, $regexEnabled, $containsType);
168 168
     }
@@ -176,17 +176,17 @@  discard block
 block discarded – undo
176 176
      * @return Mailcode_Commands_IfBase
177 177
      * @throws Mailcode_Factory_Exception
178 178
      */
179
-    public function buildIfListNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, bool $regexEnabled=false) : Mailcode_Commands_IfBase
179
+    public function buildIfListNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, bool $regexEnabled = false) : Mailcode_Commands_IfBase
180 180
     {
181 181
         return $this->buildIfContains($ifType, $variable, $searchTerms, $caseInsensitive, $regexEnabled, 'list-not-contains');
182 182
     }
183 183
 
184
-    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
184
+    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
185 185
     {
186 186
         return $this->buildIfSearch($ifType, 'begins-with', $variable, $search, $caseInsensitive);
187 187
     }
188 188
     
189
-    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
189
+    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
190 190
     {
191 191
         return $this->buildIfSearch($ifType, 'ends-with', $variable, $search, $caseInsensitive);
192 192
     }
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         );
237 237
     }
238 238
 
239
-    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
239
+    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
240 240
     {
241 241
         $keyword = ' ';
242 242
         
243
-        if($caseInsensitive)
243
+        if ($caseInsensitive)
244 244
         {
245 245
             $keyword = ' '.Mailcode_Commands_Keywords::TYPE_INSENSITIVE;
246 246
         }
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
     
275 275
     public function checkCommand(Mailcode_Commands_Command $command) : void
276 276
     {
277
-        if($command->isValid())
277
+        if ($command->isValid())
278 278
         {
279 279
             return;
280 280
         }
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
      */
304 304
     public function setEncoding(Mailcode_Commands_Command $cmd, string $urlEncoding) : void
305 305
     {
306
-        if($cmd instanceof Mailcode_Interfaces_Commands_Validation_URLEncode)
306
+        if ($cmd instanceof Mailcode_Interfaces_Commands_Validation_URLEncode)
307 307
         {
308 308
             $cmd->setURLEncoding(false);
309 309
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             }
314 314
         }
315 315
 
316
-        if($cmd instanceof Mailcode_Interfaces_Commands_Validation_URLDecode)
316
+        if ($cmd instanceof Mailcode_Interfaces_Commands_Validation_URLDecode)
317 317
         {
318 318
             $cmd->setURLDecoding(false);
319 319
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      */
333 333
     public function quoteString(string $string) : string
334 334
     {
335
-        if(substr($string, 0, 1) === '"' && substr($string, -1, 1) === '"') {
335
+        if (substr($string, 0, 1) === '"' && substr($string, -1, 1) === '"') {
336 336
             return $string;
337 337
         }
338 338
 
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         
41 41
         $this->instantiator->checkCommand($cmd);
42 42
         
43
-        if($cmd instanceof Mailcode_Commands_Command_ShowVariable)
43
+        if ($cmd instanceof Mailcode_Commands_Command_ShowVariable)
44 44
         {
45 45
             return $cmd;
46 46
         }
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
         throw $this->instantiator->exceptionUnexpectedType('ShowVariable', $cmd);
49 49
     }
50 50
     
51
-    public function date(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowDate
51
+    public function date(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowDate
52 52
     {
53 53
         return (new Date())->create($variableName, $formatString);
54 54
     }
55 55
 
56
-    public function number(string $variableName, string $formatString="", bool $absolute=false) : Mailcode_Commands_Command_ShowNumber
56
+    public function number(string $variableName, string $formatString = "", bool $absolute = false) : Mailcode_Commands_Command_ShowNumber
57 57
     {
58 58
         return (new Number())->create($variableName, $formatString, $absolute);
59 59
     }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * @return Mailcode_Commands_Command_ShowPhone
68 68
      * @throws Mailcode_Factory_Exception
69 69
      */
70
-    public function phone(string $variableName, string $sourceFormat, string $urlEncoding=Mailcode_Factory::URL_ENCODING_NONE) : Mailcode_Commands_Command_ShowPhone
70
+    public function phone(string $variableName, string $sourceFormat, string $urlEncoding = Mailcode_Factory::URL_ENCODING_NONE) : Mailcode_Commands_Command_ShowPhone
71 71
     {
72 72
         return (new Phone())->create($variableName, $sourceFormat, $urlEncoding);
73 73
     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @return Mailcode_Commands_Command_ShowURL
90 90
      * @throws Mailcode_Factory_Exception
91 91
      */
92
-    public function url(string $url, ?string $trackingID=null, array $queryParams=array()) : Mailcode_Commands_Command_ShowURL
92
+    public function url(string $url, ?string $trackingID = null, array $queryParams = array()) : Mailcode_Commands_Command_ShowURL
93 93
     {
94 94
         return (new URL())->create($url, $trackingID, $queryParams);
95 95
     }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show/Snippet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
         $this->instantiator->checkCommand($cmd);
38 38
 
39
-        if($cmd instanceof Mailcode_Commands_Command_ShowSnippet)
39
+        if ($cmd instanceof Mailcode_Commands_Command_ShowSnippet)
40 40
         {
41 41
             return $cmd;
42 42
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show/Date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
  */
24 24
 class Date extends Mailcode_Factory_CommandSets_Set
25 25
 {
26
-    public function create(string $variableName, string $formatString="") : Mailcode_Commands_Command_ShowDate
26
+    public function create(string $variableName, string $formatString = "") : Mailcode_Commands_Command_ShowDate
27 27
     {
28 28
         $variableName = $this->instantiator->filterVariableName($variableName);
29 29
 
30 30
         $format = '';
31
-        if(!empty($formatString))
31
+        if (!empty($formatString))
32 32
         {
33 33
             $format = sprintf(
34 34
                 ' "%s"',
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
         $this->instantiator->checkCommand($cmd);
51 51
 
52
-        if($cmd instanceof Mailcode_Commands_Command_ShowDate)
52
+        if ($cmd instanceof Mailcode_Commands_Command_ShowDate)
53 53
         {
54 54
             return $cmd;
55 55
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Show/URL.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  discard block
 block discarded – undo
33 33
      * @return Mailcode_Commands_Command_ShowURL
34 34
      * @throws Mailcode_Factory_Exception
35 35
      */
36
-    public function create(string $url, ?string $trackingID=null, array $queryParams=array()) : Mailcode_Commands_Command_ShowURL
36
+    public function create(string $url, ?string $trackingID = null, array $queryParams = array()) : Mailcode_Commands_Command_ShowURL
37 37
     {
38 38
         $contentID = PreParser::storeContent($url);
39 39
 
40 40
         $params = array();
41 41
         $params[] = (string)$contentID;
42 42
 
43
-        if($trackingID !== null)
43
+        if ($trackingID !== null)
44 44
         {
45 45
             $params[] = sprintf('"%s"', $trackingID);
46 46
         }
47 47
 
48
-        if(!empty($queryParams))
48
+        if (!empty($queryParams))
49 49
         {
50
-            foreach($queryParams as $name => $value)
50
+            foreach ($queryParams as $name => $value)
51 51
             {
52 52
                 $params[] = sprintf(
53 53
                     '"%s=%s"',
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $this->instantiator->checkCommand($cmd);
70 70
 
71
-        if($cmd instanceof Mailcode_Commands_Command_ShowURL)
71
+        if ($cmd instanceof Mailcode_Commands_Command_ShowURL)
72 72
         {
73 73
             return $cmd;
74 74
         }
Please login to merge, or discard this patch.