@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | */ |
21 | 21 | abstract class Mailcode_Factory_CommandSets_IfBase extends Mailcode_Factory_CommandSets_Set |
22 | 22 | { |
23 | - public function else() : Mailcode_Commands_Command_Else |
|
23 | + public function else { |
|
24 | + () : Mailcode_Commands_Command_Else |
|
24 | 25 | { |
25 | 26 | $cmd = Mailcode::create()->getCommands()->createCommand( |
26 | 27 | 'Else', |
@@ -28,6 +29,7 @@ discard block |
||
28 | 29 | '', |
29 | 30 | '{else}' |
30 | 31 | ); |
32 | + } |
|
31 | 33 | |
32 | 34 | $this->instantiator->checkCommand($cmd); |
33 | 35 |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if($keyCommand instanceof Mailcode_Commands_IfBase) |
41 | 41 | { |
42 | 42 | $body .= ' '.$this->getSign($keyword).' '.$this->translateBody($keyCommand); |
43 | - } |
|
44 | - else |
|
43 | + } else |
|
45 | 44 | { |
46 | 45 | throw new Mailcode_Exception( |
47 | 46 | 'Keyword command type does not match expected base class.', |
@@ -36,8 +36,7 @@ |
||
36 | 36 | if($val->isValid()) |
37 | 37 | { |
38 | 38 | $this->searchTerm = $val->getToken(); |
39 | - } |
|
40 | - else |
|
39 | + } else |
|
41 | 40 | { |
42 | 41 | $this->validationResult->makeError( |
43 | 42 | t('No search term specified.'), |
@@ -44,8 +44,7 @@ discard block |
||
44 | 44 | if(in_array($var->getSign(), $this->getAllowedOperands())) |
45 | 45 | { |
46 | 46 | $this->operandToken = $var->getToken(); |
47 | - } |
|
48 | - else |
|
47 | + } else |
|
49 | 48 | { |
50 | 49 | $this->validationResult->makeError( |
51 | 50 | t('Invalid operand %1$s.', $var->getSign()).' '. |
@@ -54,8 +53,7 @@ discard block |
||
54 | 53 | Mailcode_Commands_CommonConstants::VALIDATION_INVALID_OPERAND |
55 | 54 | ); |
56 | 55 | } |
57 | - } |
|
58 | - else |
|
56 | + } else |
|
59 | 57 | { |
60 | 58 | $this->validationResult->makeError( |
61 | 59 | t('No operand has been specified.'), |
@@ -36,8 +36,7 @@ |
||
36 | 36 | if($var->isValid()) |
37 | 37 | { |
38 | 38 | $this->variableToken = $var->getToken(); |
39 | - } |
|
40 | - else |
|
39 | + } else |
|
41 | 40 | { |
42 | 41 | $this->validationResult->makeError( |
43 | 42 | t('No variable has been specified.'), |
@@ -119,8 +119,7 @@ |
||
119 | 119 | if($closing) |
120 | 120 | { |
121 | 121 | array_pop($stack); |
122 | - } |
|
123 | - else |
|
122 | + } else |
|
124 | 123 | { |
125 | 124 | $stack[] = $tagName; |
126 | 125 | } |
@@ -260,8 +260,7 @@ |
||
260 | 260 | if($highlighted) |
261 | 261 | { |
262 | 262 | $formatting->replaceWithHTMLHighlighting(); |
263 | - } |
|
264 | - else |
|
263 | + } else |
|
265 | 264 | { |
266 | 265 | $formatting->replaceWithNormalized(); |
267 | 266 | } |
@@ -146,8 +146,7 @@ discard block |
||
146 | 146 | if($cmd instanceof Mailcode_Commands_Command_Type_Opening) |
147 | 147 | { |
148 | 148 | $this->stack[] = $cmd; |
149 | - } |
|
150 | - else if($cmd instanceof Mailcode_Commands_Command_Type_Closing) |
|
149 | + } else if($cmd instanceof Mailcode_Commands_Command_Type_Closing) |
|
151 | 150 | { |
152 | 151 | array_pop($this->stack); |
153 | 152 | } |
@@ -177,13 +176,11 @@ discard block |
||
177 | 176 | if(!empty($matches[1][$index])) |
178 | 177 | { |
179 | 178 | $name = $matches[1][$index]; |
180 | - } |
|
181 | - else if(!empty($matches[2][$index])) |
|
179 | + } else if(!empty($matches[2][$index])) |
|
182 | 180 | { |
183 | 181 | $name = $matches[2][$index]; |
184 | 182 | $params = $matches[3][$index]; |
185 | - } |
|
186 | - else if(!empty($matches[4][$index])) |
|
183 | + } else if(!empty($matches[4][$index])) |
|
187 | 184 | { |
188 | 185 | $name = $matches[4][$index]; |
189 | 186 | $type = $matches[5][$index]; |
@@ -36,8 +36,7 @@ |
||
36 | 36 | if($var->isValid()) |
37 | 37 | { |
38 | 38 | $this->valueToken = $var->getToken(); |
39 | - } |
|
40 | - else |
|
39 | + } else |
|
41 | 40 | { |
42 | 41 | $this->validationResult->makeError( |
43 | 42 | t('No value has been specified.'), |