Completed
Push — master ( e103ac...127bed )
by Chris
03:50
created
php/hamle/Text/Filter.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,23 +54,26 @@
 block discarded – undo
54 54
   }
55 55
 
56 56
   function toHTML($escape = false) {
57
-    if($escape)
58
-      return "<?=htmlspecialchars(" .$this->toPHP() . ")?>";
57
+    if($escape) {
58
+          return "<?=htmlspecialchars(" .$this->toPHP() . ")?>";
59
+    }
59 60
     return "<?=" . $this->toPHP() . "?>";
60 61
   }
61 62
 
62 63
   function toPHP() {
63 64
     $o = [$this->what->toPHPVar()] ;
64
-    foreach($this->vars as $v)
65
-      $o[] = $this->varToCode($v);
65
+    foreach($this->vars as $v) {
66
+          $o[] = $this->varToCode($v);
67
+    }
66 68
     return "{$this->filter}(" . implode(',',$o) . ")";
67 69
   }
68 70
 
69 71
   static function iterSplit($v, $sep = ",") {
70 72
     $o = [];
71 73
     foreach(explode($sep, $v) as $k=>$i) {
72
-      if($i)
73
-        $o[] = ['v'=>trim($i), 'value'=>trim($i), 'k'=>$k,'key'=>$k];
74
+      if($i) {
75
+              $o[] = ['v'=>trim($i), 'value'=>trim($i), 'k'=>$k,'key'=>$k];
76
+      }
74 77
     }
75 78
     return new WrapArray($o);
76 79
   }
Please login to merge, or discard this patch.