@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $tagName = strtolower($tagName); |
44 | 44 | |
45 | - if(!in_array($tagName, $this->excludeTags)) |
|
45 | + if (!in_array($tagName, $this->excludeTags)) |
|
46 | 46 | { |
47 | 47 | $this->excludeTags[] = $tagName; |
48 | 48 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function excludeTags(array $tagNames) |
60 | 60 | { |
61 | - foreach($tagNames as $tagName) |
|
61 | + foreach ($tagNames as $tagName) |
|
62 | 62 | { |
63 | 63 | $this->excludeTag((string)$tagName); |
64 | 64 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $pos = $this->getStartPosition(); |
55 | 55 | |
56 | - if(is_bool($pos)) |
|
56 | + if (is_bool($pos)) |
|
57 | 57 | { |
58 | 58 | return ''; |
59 | 59 | } |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | { |
76 | 76 | $tagNames = $this->getParentTags(); |
77 | 77 | |
78 | - foreach($tagNames as $tagName) |
|
78 | + foreach ($tagNames as $tagName) |
|
79 | 79 | { |
80 | - if($this->formatter->isTagExcluded($tagName)) |
|
80 | + if ($this->formatter->isTagExcluded($tagName)) |
|
81 | 81 | { |
82 | 82 | return true; |
83 | 83 | } |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | // Create a stack of all direct parent tags of the command. |
100 | 100 | // Handles closing tags as well. |
101 | 101 | $stack = array(); |
102 | - foreach($tags[2] as $idx => $tagName) |
|
102 | + foreach ($tags[2] as $idx => $tagName) |
|
103 | 103 | { |
104 | 104 | $closing = $tags[1][$idx] === '/'; |
105 | 105 | |
106 | - if($closing) |
|
106 | + if ($closing) |
|
107 | 107 | { |
108 | 108 | array_pop($stack); |
109 | 109 | } |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | |
129 | 129 | // This check is easy: if the command is in the attribute |
130 | 130 | // of any of the tags, we will find the command marker in there. |
131 | - foreach($tags[3] as $attributes) |
|
131 | + foreach ($tags[3] as $attributes) |
|
132 | 132 | { |
133 | - if(strstr($attributes, self::COMMAND_MARKER)) |
|
133 | + if (strstr($attributes, self::COMMAND_MARKER)) |
|
134 | 134 | { |
135 | 135 | return true; |
136 | 136 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | private function getTagAncestry() : array |
149 | 149 | { |
150 | - if($this->ancestryChecked) |
|
150 | + if ($this->ancestryChecked) |
|
151 | 151 | { |
152 | 152 | return $this->tagAncestry; |
153 | 153 | } |
@@ -89,23 +89,23 @@ discard block |
||
89 | 89 | |
90 | 90 | $placeholderID = $this->placeholder->getID(); |
91 | 91 | |
92 | - foreach($placeholders as $placeholder) |
|
92 | + foreach ($placeholders as $placeholder) |
|
93 | 93 | { |
94 | - if($placeholder->getID() === $placeholderID) |
|
94 | + if ($placeholder->getID() === $placeholderID) |
|
95 | 95 | { |
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | |
99 | 99 | $start = $this->subject->getSubstrPosition($placeholder->getReplacementText()); |
100 | 100 | |
101 | - if($start === false) |
|
101 | + if ($start === false) |
|
102 | 102 | { |
103 | 103 | continue; |
104 | 104 | } |
105 | 105 | |
106 | 106 | $end = $start + $placeholder->getReplacementLength(); |
107 | 107 | |
108 | - if($position >= $start && $position <= $end) |
|
108 | + if ($position >= $start && $position <= $end) |
|
109 | 109 | { |
110 | 110 | return true; |
111 | 111 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | { |
122 | 122 | $start = $this->getStartPosition(); |
123 | 123 | |
124 | - if($start !== false) |
|
124 | + if ($start !== false) |
|
125 | 125 | { |
126 | 126 | return $start + $this->placeholder->getReplacementLength(); |
127 | 127 | } |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | { |
152 | 152 | $needle = $this->placeholder->getReplacementText(); |
153 | 153 | |
154 | - if($this->subject->replaceSubstrings($needle, $replacementText)) |
|
154 | + if ($this->subject->replaceSubstrings($needle, $replacementText)) |
|
155 | 155 | { |
156 | 156 | return; |
157 | 157 | } |
158 | 158 | |
159 | 159 | // Complain about missing placeholders only if we |
160 | 160 | // are not in partial mode. |
161 | - if(!$this->formatter->getFormatting()->isPartial()) |
|
161 | + if (!$this->formatter->getFormatting()->isPartial()) |
|
162 | 162 | { |
163 | 163 | throw new Mailcode_Exception( |
164 | 164 | 'Could not find the placeholder to replace', |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | public function format() : void |
175 | 175 | { |
176 | - if($this->requiresAdjustment() && (!empty($this->prepend) || !empty($this->append))) |
|
176 | + if ($this->requiresAdjustment() && (!empty($this->prepend) || !empty($this->append))) |
|
177 | 177 | { |
178 | 178 | $this->replaceWith(sprintf( |
179 | 179 | '%s%s%s', |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | $errors = $this->errors; |
101 | 101 | |
102 | - if(!$result->isValid()) |
|
102 | + if (!$result->isValid()) |
|
103 | 103 | { |
104 | 104 | $errors[] = new Mailcode_Collection_Error_Message( |
105 | 105 | '', |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | { |
116 | 116 | $errors = $this->getErrors(); |
117 | 117 | |
118 | - if(!empty($errors)) |
|
118 | + if (!empty($errors)) |
|
119 | 119 | { |
120 | 120 | return array_shift($errors); |
121 | 121 | } |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | { |
158 | 158 | $hashes = array(); |
159 | 159 | |
160 | - foreach($this->commands as $command) |
|
160 | + foreach ($this->commands as $command) |
|
161 | 161 | { |
162 | 162 | $hash = $command->getHash(); |
163 | 163 | |
164 | - if(!isset($hashes[$hash])) |
|
164 | + if (!isset($hashes[$hash])) |
|
165 | 165 | { |
166 | 166 | $hashes[$hash] = $command; |
167 | 167 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | */ |
179 | 179 | public function addCommands(array $commands) : Mailcode_Collection |
180 | 180 | { |
181 | - foreach($commands as $command) |
|
181 | + foreach ($commands as $command) |
|
182 | 182 | { |
183 | 183 | $this->addCommand($command); |
184 | 184 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | { |
198 | 198 | $collection = new Mailcode_Variables_Collection_Regular(); |
199 | 199 | |
200 | - foreach($this->commands as $command) |
|
200 | + foreach ($this->commands as $command) |
|
201 | 201 | { |
202 | 202 | $collection->mergeWith($command->getVariables()); |
203 | 203 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | public function getValidationResult() : OperationResult |
209 | 209 | { |
210 | - if($this->validationResult instanceof OperationResult) |
|
210 | + if ($this->validationResult instanceof OperationResult) |
|
211 | 211 | { |
212 | 212 | return $this->validationResult; |
213 | 213 | } |
@@ -223,9 +223,9 @@ discard block |
||
223 | 223 | { |
224 | 224 | $errors = $this->getErrors(); |
225 | 225 | |
226 | - foreach($errors as $error) |
|
226 | + foreach ($errors as $error) |
|
227 | 227 | { |
228 | - if($error->getCode() === $code) |
|
228 | + if ($error->getCode() === $code) |
|
229 | 229 | { |
230 | 230 | return true; |
231 | 231 | } |
@@ -262,9 +262,9 @@ discard block |
||
262 | 262 | { |
263 | 263 | $result = array(); |
264 | 264 | |
265 | - foreach($this->commands as $command) |
|
265 | + foreach ($this->commands as $command) |
|
266 | 266 | { |
267 | - if($command instanceof $className) |
|
267 | + if ($command instanceof $className) |
|
268 | 268 | { |
269 | 269 | $result[] = $command; |
270 | 270 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | { |
278 | 278 | $commands = $this->getCommands(); |
279 | 279 | |
280 | - if(!empty($commands)) |
|
280 | + if (!empty($commands)) |
|
281 | 281 | { |
282 | 282 | return array_shift($commands); |
283 | 283 | } |
@@ -60,7 +60,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -56,12 +56,12 @@ discard block |
||
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 |
||
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', |
@@ -40,7 +40,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $tokens = $this->params->getInfo()->getStringLiterals(); |
66 | 66 | |
67 | 67 | // no format specified? Use the default one. |
68 | - if(empty($tokens)) |
|
68 | + if (empty($tokens)) |
|
69 | 69 | { |
70 | 70 | return; |
71 | 71 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $result = $this->formatInfo->validateFormat($format); |
80 | 80 | |
81 | - if($result->isValid()) |
|
81 | + if ($result->isValid()) |
|
82 | 82 | { |
83 | 83 | $this->formatString = $format; |
84 | 84 | return; |