Completed
Push — master ( 8468f5...860016 )
by Chris
05:04
created
php/hamle/Parse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
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,9 +192,9 @@  discard block
 block discarded – undo
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);
197
+              $param = str_replace('+', '%2B', $param);
198 198
 //              parse_str($param, $attr);
199 199
               $attr = $this->parseQueryString($param);
200 200
             }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
               if ($s[0] == ".") $class[] = substr($s, 1);
206 206
               if ($s[0] == "!") $ref = substr($s, 1);
207 207
             }
208
-            if($ref)
208
+            if ($ref)
209 209
               $hTag = new Tag\DynHtml($tag, $class, $attr, $id, $ref);
210 210
             else
211 211
               $hTag = new Tag\Html($tag, $class, $attr, $id);
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
 
226 226
   function parseQueryString($qs) {
227 227
     $out = [];
228
-    foreach(explode('&',$qs) as $s) {
229
-      list($k, $v) = explode('=',$s,2);
228
+    foreach (explode('&', $qs) as $s) {
229
+      list($k, $v) = explode('=', $s, 2);
230 230
       $out[urldecode($k)] = urldecode($v);
231 231
     }
232 232
     return $out;
Please login to merge, or discard this patch.