@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $i = self::indentLevel($indent); |
158 | 158 | unset($m[0]); |
159 | 159 | switch (strlen($code) ? $code[0] : ($textcode ? $textcode : "")) { |
160 | - case "|": //Control Tag |
|
160 | + case "|" : //Control Tag |
|
161 | 161 | if ($code == "|snippet") |
162 | 162 | $hTag = new Tag\Snippet($text); |
163 | 163 | elseif ($code == "|form") |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | break; |
193 | 193 | default: |
194 | 194 | $attr = array(); |
195 | - if(isset($params[0]) && $params[0] == "[") { |
|
195 | + if (isset($params[0]) && $params[0] == "[") { |
|
196 | 196 | $param = substr($params, 1, strlen($params) - 2); |
197 | - $param = str_replace('+','%2B', $param); |
|
198 | - $param = str_replace('\\&','%26', $param); |
|
197 | + $param = str_replace('+', '%2B', $param); |
|
198 | + $param = str_replace('\\&', '%26', $param); |
|
199 | 199 | // parse_str($param, $attr); |
200 | 200 | $attr = $this->parseQueryString($param); |
201 | 201 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | if ($s[0] == ".") $class[] = substr($s, 1); |
207 | 207 | if ($s[0] == "!") $ref = substr($s, 1); |
208 | 208 | } |
209 | - if($ref) |
|
209 | + if ($ref) |
|
210 | 210 | $hTag = new Tag\DynHtml($tag, $class, $attr, $id, $ref); |
211 | 211 | else |
212 | 212 | $hTag = new Tag\Html($tag, $class, $attr, $id); |
@@ -219,16 +219,16 @@ discard block |
||
219 | 219 | else |
220 | 220 | $this->root[] = $hTag; |
221 | 221 | } else |
222 | - throw new ParseError("Unable to parse line {$this->lineNo}\n\"$line\"/" . preg_last_error()); |
|
222 | + throw new ParseError("Unable to parse line {$this->lineNo}\n\"$line\"/".preg_last_error()); |
|
223 | 223 | $this->lineNo++; |
224 | 224 | } |
225 | 225 | } |
226 | 226 | |
227 | 227 | function parseQueryString($qs) { |
228 | 228 | $out = []; |
229 | - foreach(explode('&',$qs) as $s) { |
|
230 | - $kv = explode('=',$s,2); |
|
231 | - $out[urldecode($kv[0])] = isset($kv[1]?urldecode($kv[1]):""); |
|
229 | + foreach (explode('&', $qs) as $s) { |
|
230 | + $kv = explode('=', $s, 2); |
|
231 | + $out[urldecode($kv[0])] = isset($kv[1] ? urldecode($kv[1]) : ""); |
|
232 | 232 | } |
233 | 233 | return $out; |
234 | 234 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $m = array(); |
247 | 247 | while ($this->lineNo + 1 < $this->lineCount && |
248 | 248 | (!trim($this->lines[$this->lineNo + 1]) || |
249 | - preg_match('/^(\s){' . $indent . '}((\s)+[^\s].*)$/', |
|
249 | + preg_match('/^(\s){'.$indent.'}((\s)+[^\s].*)$/', |
|
250 | 250 | $this->lines[$this->lineNo + 1], $m))) { |
251 | 251 | if (trim($this->lines[$this->lineNo + 1])) |
252 | 252 | $out[] = $m[2]; |