@@ -141,13 +141,11 @@ |
||
141 | 141 | if(!empty($matches[1][$index])) |
142 | 142 | { |
143 | 143 | $name = $matches[1][$index]; |
144 | - } |
|
145 | - else if(!empty($matches[2][$index])) |
|
144 | + } else if(!empty($matches[2][$index])) |
|
146 | 145 | { |
147 | 146 | $name = $matches[2][$index]; |
148 | 147 | $params = $matches[3][$index]; |
149 | - } |
|
150 | - else if(!empty($matches[4][$index])) |
|
148 | + } else if(!empty($matches[4][$index])) |
|
151 | 149 | { |
152 | 150 | $name = $matches[4][$index]; |
153 | 151 | $type = $matches[5][$index]; |
@@ -158,8 +158,7 @@ |
||
158 | 158 | if($highlighted) |
159 | 159 | { |
160 | 160 | $replace = $placeholder->getHighlightedText(); |
161 | - } |
|
162 | - else |
|
161 | + } else |
|
163 | 162 | { |
164 | 163 | $replace = $placeholder->getOriginalText(); |
165 | 164 | } |
@@ -50,8 +50,7 @@ |
||
50 | 50 | if(!empty($matches[3][$idx])) |
51 | 51 | { |
52 | 52 | $this->addSingle($matches[3][$idx], $matchedText); |
53 | - } |
|
54 | - else |
|
53 | + } else |
|
55 | 54 | { |
56 | 55 | $this->addPathed($matches[1][$idx], $matches[2][$idx], $matchedText); |
57 | 56 | } |
@@ -62,7 +62,9 @@ discard block |
||
62 | 62 | |
63 | 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 | + ); |
|
67 | + } |
|
66 | 68 | } |
67 | 69 | |
68 | 70 | public function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
@@ -97,7 +99,9 @@ discard block |
||
97 | 99 | |
98 | 100 | public function elseIf(string $condition, string $type='') : string |
99 | 101 | { |
100 | - return $this->command2string(Mailcode_Factory::elseIf($condition, $type)); |
|
102 | + return $this->command2string(Mailcode_Factory::elseIf($condition, $type) { |
|
103 | + ); |
|
104 | + } |
|
101 | 105 | } |
102 | 106 | |
103 | 107 | public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : string |
@@ -130,10 +134,12 @@ discard block |
||
130 | 134 | return $this->command2string(Mailcode_Factory::elseIfVarNotEqualsString($variable, $value)); |
131 | 135 | } |
132 | 136 | |
133 | - public function else() : string |
|
137 | + public function else { |
|
138 | + () : string |
|
134 | 139 | { |
135 | 140 | return $this->command2string(Mailcode_Factory::else()); |
136 | 141 | } |
142 | + } |
|
137 | 143 | |
138 | 144 | public function end() : string |
139 | 145 | { |
@@ -157,7 +157,8 @@ discard block |
||
157 | 157 | throw self::_exceptionUnexpectedType('Comment', $cmd); |
158 | 158 | } |
159 | 159 | |
160 | - public static function else() : Mailcode_Commands_Command_Else |
|
160 | + public static function else { |
|
161 | + () : Mailcode_Commands_Command_Else |
|
161 | 162 | { |
162 | 163 | $cmd = Mailcode::create()->getCommands()->createCommand( |
163 | 164 | 'Else', |
@@ -165,6 +166,7 @@ discard block |
||
165 | 166 | '', |
166 | 167 | '{else}' |
167 | 168 | ); |
169 | + } |
|
168 | 170 | |
169 | 171 | self::_checkCommand($cmd); |
170 | 172 |
@@ -70,8 +70,7 @@ |
||
70 | 70 | if($result->isValid()) |
71 | 71 | { |
72 | 72 | $this->formatString = $format; |
73 | - } |
|
74 | - else |
|
73 | + } else |
|
75 | 74 | { |
76 | 75 | $this->validationResult->makeError( |
77 | 76 | $result->getErrorMessage(), |