@@ -43,6 +43,6 @@ |
||
43 | 43 | |
44 | 44 | static function filterText(string $s): string |
45 | 45 | { |
46 | - return "/*<![CDATA[*/\n" . $s . '/*]]>*/'; |
|
46 | + return "/*<![CDATA[*/\n".$s.'/*]]>*/'; |
|
47 | 47 | } |
48 | 48 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | /** |
60 | 60 | * @psalm-suppress UnresolvableInclude |
61 | 61 | */ |
62 | - require_once ME_DIR . '/lib/phpsass/SassParser.php'; |
|
62 | + require_once ME_DIR.'/lib/phpsass/SassParser.php'; |
|
63 | 63 | $sp = new SassParser([ |
64 | 64 | 'cache' => false, |
65 | 65 | 'style' => stdConf::get('me.developer') |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | $tree = $sp->toTree($s); |
72 | 72 | $out = $tree->render(); |
73 | 73 | $pad = str_pad('', $indent, ' '); |
74 | - return $pad . str_replace("\n", "\n$pad", trim($out)); |
|
74 | + return $pad.str_replace("\n", "\n$pad", trim($out)); |
|
75 | 75 | } |
76 | 76 | } |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | $o = self::queryId($this->filters); |
41 | 41 | } else { |
42 | 42 | $o = |
43 | - '$ctx->hamleFindTypeTags($scope,' . |
|
44 | - self::queryParams($this->filters) . |
|
43 | + '$ctx->hamleFindTypeTags($scope,'. |
|
44 | + self::queryParams($this->filters). |
|
45 | 45 | ')'; |
46 | 46 | } |
47 | 47 | if ($this->immediate) { |
@@ -138,8 +138,8 @@ discard block |
||
138 | 138 | ]; |
139 | 139 | if (!$type || $type === '*') { |
140 | 140 | $opt[0] = Text::varToCode($id); |
141 | - return '$ctx->hamleFindId($scope,' . join(',', $opt) . ')'; |
|
141 | + return '$ctx->hamleFindId($scope,'.join(',', $opt).')'; |
|
142 | 142 | } |
143 | - return '$ctx->hamleFindTypeId($scope,' . join(',', $opt) . ')'; |
|
143 | + return '$ctx->hamleFindTypeId($scope,'.join(',', $opt).')'; |
|
144 | 144 | } |
145 | 145 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | public function toPHP(): string |
35 | 35 | { |
36 | - $o = '$scope->namedModel(' . Text::varToCode($this->name) . ')'; |
|
36 | + $o = '$scope->namedModel('.Text::varToCode($this->name).')'; |
|
37 | 37 | if ($this->immediate) { |
38 | 38 | $o = $this->immediate->apply($o); |
39 | 39 | } |
@@ -44,9 +44,9 @@ |
||
44 | 44 | array_unshift($args, $out); |
45 | 45 | if ($this->name !== '') { |
46 | 46 | $o = |
47 | - "\$ctx->hamleFilter(\$scope,{$this->name}," . implode(',', $args) . ')'; |
|
47 | + "\$ctx->hamleFilter(\$scope,{$this->name},".implode(',', $args).')'; |
|
48 | 48 | } else { |
49 | - $o = "{$this->func}(" . join(',', $args) . ')'; |
|
49 | + $o = "{$this->func}(".join(',', $args).')'; |
|
50 | 50 | } |
51 | 51 | if ($this->chain) { |
52 | 52 | $o = $this->chain->apply($o); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $i = self::indentLevel($indent); |
178 | 178 | unset($m[0]); |
179 | 179 | switch (strlen($code) ? $code[0] : ($textcode ? $textcode : '')) { |
180 | - case '|': //Control Tag |
|
180 | + case '|' : //Control Tag |
|
181 | 181 | if ($code == '|snippet') { |
182 | 182 | $hTag = new Tag\Snippet($text); |
183 | 183 | } elseif ($code == '|form') { |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | } |
254 | 254 | } else { |
255 | 255 | throw new ParseError( |
256 | - "Unable to parse line {$this->lineNo}\n\"$line\" #" . |
|
256 | + "Unable to parse line {$this->lineNo}\n\"$line\" #". |
|
257 | 257 | preg_last_error(), |
258 | 258 | ); |
259 | 259 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | function toPHPFile(bool $minify = false):string |
276 | 276 | { |
277 | - return "<?php\n" . |
|
277 | + return "<?php\n". |
|
278 | 278 | "use Seufert\\Hamle;\n\n". |
279 | 279 | $this->compiledString($minify); |
280 | 280 | } |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | $this->lineNo + 1 < $this->lineCount && |
321 | 321 | (!trim($this->lines[$this->lineNo + 1]) || |
322 | 322 | preg_match( |
323 | - '/^(\s){' . $indent . '}((\s)+[^\s].*)$/', |
|
323 | + '/^(\s){'.$indent.'}((\s)+[^\s].*)$/', |
|
324 | 324 | $this->lines[$this->lineNo + 1], |
325 | 325 | $m, |
326 | 326 | )) |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | } |
343 | 343 | foreach ($this->indents as $k => $v) { |
344 | 344 | if ($v == $indent) { |
345 | - $this->indents = array_slice($this->indents, 0, 1 + (int) $k ); |
|
345 | + $this->indents = array_slice($this->indents, 0, 1 + (int) $k); |
|
346 | 346 | return $k; |
347 | 347 | } |
348 | 348 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | throw new Exception\NotFound("Unable to find HAMLE Template ($template)"); |
108 | 108 | } |
109 | 109 | $this->cacheFile = $this->setup->cachePath( |
110 | - str_replace('/', '-', $hamleFile) . '.php', |
|
110 | + str_replace('/', '-', $hamleFile).'.php', |
|
111 | 111 | ); |
112 | 112 | $this->setup->debugLog("Set cache file path to ({$this->cacheFile})"); |
113 | 113 | $cacheFileAge = is_file($this->cacheFile) ? filemtime($this->cacheFile) : 0; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | function string(string $hamleString): void |
194 | 194 | { |
195 | 195 | $md5 = md5($hamleString); |
196 | - $stringId = substr($md5, 0, 12) . substr($md5, 24, 8); |
|
196 | + $stringId = substr($md5, 0, 12).substr($md5, 24, 8); |
|
197 | 197 | $this->cacheFile = $this->setup->cachePath("string.$stringId.hamle.php"); |
198 | 198 | if (!is_file($this->cacheFile)) { |
199 | 199 | $this->parse($hamleString); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!is_dir($dir)) { |
52 | 52 | mkdir($dir); |
53 | 53 | } |
54 | - return $dir . $f; |
|
54 | + return $dir.$f; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | 'newlinebr' => \Seufert\Hamle\Text\Filter::newlinebr(...$args), |
183 | 183 | 'replace' => \Seufert\Hamle\Text\Filter::replace(...$args), |
184 | 184 | 'ascents' => \Seufert\Hamle\Text\Filter::ascents(...$args), |
185 | - default => throw new RuntimeException('Unknown Filter: ' . $filter) |
|
185 | + default => throw new RuntimeException('Unknown Filter: '.$filter) |
|
186 | 186 | }; |
187 | 187 | } |
188 | 188 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | class Scope implements \Seufert\Hamle\Runtime\Scope |
14 | 14 | { |
15 | - public Scope|null $lastScope = null; |
|
15 | + public Scope | null $lastScope = null; |
|
16 | 16 | |
17 | 17 | /** @var list<Model> $parents Parent Scopes */ |
18 | 18 | public array $parents = []; |