@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | function __construct(string $tag, H\Tag $parentTag = null) |
51 | 51 | { |
52 | 52 | parent::__construct(); |
53 | - $this->o = "\$o" . self::$instCount++; |
|
53 | + $this->o = "\$o".self::$instCount++; |
|
54 | 54 | $this->type = strtolower($tag); |
55 | 55 | $this->var = ''; |
56 | 56 | if ($parentTag && $this->type == 'else') { |
@@ -70,15 +70,15 @@ discard block |
||
70 | 70 | |
71 | 71 | function renderStTag(): string |
72 | 72 | { |
73 | - $out = '<' . '?php '; |
|
73 | + $out = '<'.'?php '; |
|
74 | 74 | $scopeName = ''; |
75 | 75 | if ($this->type === 'if') { |
76 | 76 | $hsvcomp = new H\Text\Comparison($this->var); |
77 | - $out .= 'if(' . $hsvcomp->toPHP() . ') {'; |
|
78 | - return $out . "\n?>"; |
|
77 | + $out .= 'if('.$hsvcomp->toPHP().') {'; |
|
78 | + return $out."\n?>"; |
|
79 | 79 | } elseif ($this->type === 'else') { |
80 | 80 | $out .= '/* else */'; |
81 | - return $out . "\n?>"; |
|
81 | + return $out."\n?>"; |
|
82 | 82 | } |
83 | 83 | /** @var H\Text|null $hsv */ |
84 | 84 | $hsv = null; |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | switch ($this->type) { |
95 | 95 | case 'each': |
96 | 96 | if ($hsv) { |
97 | - $out .= 'foreach(' . $hsv->toPHP() . " as {$this->o}) { \n"; |
|
97 | + $out .= 'foreach('.$hsv->toPHP()." as {$this->o}) { \n"; |
|
98 | 98 | } else { |
99 | 99 | $out .= "foreach(\$scope->model() as {$this->o}) { \n"; |
100 | 100 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | $out .= "echo \$ctx->hamleInclude(\$scope, {$hsv->toPHP()});"; |
122 | 122 | } |
123 | - return $out . "\n?>"; |
|
123 | + return $out."\n?>"; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | function renderEnTag(): string |
135 | 135 | { |
136 | - $out = '<' . '?php '; |
|
136 | + $out = '<'.'?php '; |
|
137 | 137 | switch ($this->type) { |
138 | 138 | case 'each': |
139 | 139 | $out .= '$scope = $scope->lastScope(); '; |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | if ($this->else) { |
157 | 157 | $out .= 'else{'; |
158 | 158 | } |
159 | - return $out . "\n?>"; |
|
159 | + return $out."\n?>"; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | function render(int $indent = 0, bool $minify = false): string |