@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | $this->type = strtolower($tag); |
| 52 | 52 | $this->var = ""; |
| 53 | 53 | if ($parentTag && $this->type == "else") { |
| 54 | - if($parentTag instanceof H\Tag) { |
|
| 54 | + if ($parentTag instanceof H\Tag) { |
|
| 55 | 55 | $elseTag = $parentTag->tags[count($parentTag->tags) - 1]; |
| 56 | - if($elseTag instanceof H\Tag\Control && |
|
| 56 | + if ($elseTag instanceof H\Tag\Control && |
|
| 57 | 57 | in_array($elseTag->type, array('with', 'if')) |
| 58 | 58 | ) { |
| 59 | 59 | $elseTag->else = true; |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | break; |
| 102 | 102 | case "include": |
| 103 | 103 | $file = $hsv->toHTML(); |
| 104 | - if($file[0] == "#") |
|
| 105 | - $out .= "echo Hamle\\Run::includeFragment(".$hsv->toPHP().");"; |
|
| 104 | + if ($file[0] == "#") |
|
| 105 | + $out .= "echo Hamle\\Run::includeFragment(" . $hsv->toPHP() . ");"; |
|
| 106 | 106 | else |
| 107 | 107 | $out .= "echo Hamle\\Run::includeFile(" . $hsv->toPHP() . ");"; |
| 108 | 108 | break; |
@@ -86,13 +86,13 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | $rand = false; |
| 88 | 88 | if (preg_match_all('/\\^(-?)([a-zA-Z0-9\_]*)/', $s, $m)) { |
| 89 | - foreach($m[0] as $k=>$mv) |
|
| 89 | + foreach ($m[0] as $k=>$mv) |
|
| 90 | 90 | if ($m[2][$k]) { |
| 91 | - $dir = $m[1][$k] == "-"?Hamle\Hamle::SORT_DESCENDING:Hamle\Hamle::SORT_ASCENDING; |
|
| 91 | + $dir = $m[1][$k] == "-" ? Hamle\Hamle::SORT_DESCENDING : Hamle\Hamle::SORT_ASCENDING; |
|
| 92 | 92 | $att['sort'][$m[2][$k]] = $dir; |
| 93 | 93 | } else $rand = true; |
| 94 | 94 | } |
| 95 | - if($rand) |
|
| 95 | + if ($rand) |
|
| 96 | 96 | $att['sort'] = [""=>$att['dir'] = Hamle\Hamle::SORT_RANDOM]; |
| 97 | 97 | return $att; |
| 98 | 98 | } |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | function toPHP() { |
| 113 | 113 | $sub = $this->sub ? "->" . $this->sub->toPHP() : ""; |
| 114 | - if($this->scope instanceof Scope) { |
|
| 114 | + if ($this->scope instanceof Scope) { |
|
| 115 | 115 | return $this->scope->toPHP() . $sub; |
| 116 | - } elseif($this->scope === true) { |
|
| 116 | + } elseif ($this->scope === true) { |
|
| 117 | 117 | return "Hamle\\Scope::get(0)$sub"; |
| 118 | 118 | } |
| 119 | 119 | $limit = Text::varToCode($this->sortlimit['sort']) . "," . |