@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | throw new ParseError("Unable to parse filter expression \"$s\""); |
| 73 | 73 | } |
| 74 | 74 | if (method_exists(Filter::class, $this->filter)) { |
| 75 | - $this->filter = Filter::class . '::' . $this->filter; |
|
| 75 | + $this->filter = Filter::class.'::'.$this->filter; |
|
| 76 | 76 | } elseif ( |
| 77 | 77 | in_array($this->filter, ['round', 'strtoupper', 'strtolower', 'ucfirst']) |
| 78 | 78 | ) { |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | function toHTML(bool $escape = false): string |
| 93 | 93 | { |
| 94 | 94 | if ($escape) { |
| 95 | - return '<?=htmlspecialchars(' . $this->toPHP() . ')?>'; |
|
| 95 | + return '<?=htmlspecialchars('.$this->toPHP().')?>'; |
|
| 96 | 96 | } |
| 97 | - return '<?=' . $this->toPHP() . '?>'; |
|
| 97 | + return '<?='.$this->toPHP().'?>'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | function toPHPpre(): string |
@@ -114,14 +114,14 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | $o = ''; |
| 116 | 116 | foreach ($this->vars as $v) { |
| 117 | - $o .= ',' . $this->varToCode($v); |
|
| 117 | + $o .= ','.$this->varToCode($v); |
|
| 118 | 118 | } |
| 119 | 119 | return "$o)$post"; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | function toPHP(): string |
| 123 | 123 | { |
| 124 | - return $this->toPHPpre() . $this->what->toPHPVar() . $this->toPHPpost(); |
|
| 124 | + return $this->toPHPpre().$this->what->toPHPVar().$this->toPHPpost(); |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | static function itersplit(mixed $v, string $sep = ','): Model |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | function __construct(string $s, int $mode = self::TOKEN_CONTROL) |
| 38 | 38 | { |
| 39 | 39 | $m = []; |
| 40 | - if (preg_match('/^(.*) ' . self::REGEX_COMP_OPER . ' (.*)$/', $s, $m)) { |
|
| 40 | + if (preg_match('/^(.*) '.self::REGEX_COMP_OPER.' (.*)$/', $s, $m)) { |
|
| 41 | 41 | $this->param1 = new Text($m[1], Text::TOKEN_HTML); |
| 42 | 42 | $this->param2 = new Text($m[3], Text::TOKEN_HTML); |
| 43 | 43 | $this->operator = $m[2]; |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | switch ($this->operator) { |
| 57 | 57 | case 'equals': |
| 58 | 58 | case 'equal': |
| 59 | - return $p1 . ' == ' . $p2; |
|
| 59 | + return $p1.' == '.$p2; |
|
| 60 | 60 | case 'notequals': |
| 61 | 61 | case 'notequal': |
| 62 | - return $p1 . ' != ' . $p2; |
|
| 62 | + return $p1.' != '.$p2; |
|
| 63 | 63 | case 'less': |
| 64 | - return $p1 . ' < ' . $p2; |
|
| 64 | + return $p1.' < '.$p2; |
|
| 65 | 65 | case 'greater': |
| 66 | - return $p1 . ' > ' . $p2; |
|
| 66 | + return $p1.' > '.$p2; |
|
| 67 | 67 | case 'has': |
| 68 | 68 | return "in_array($p2, $p1)"; |
| 69 | 69 | case 'starts': |
@@ -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 | } |
@@ -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') { |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | } |
| 258 | 258 | } else { |
| 259 | 259 | throw new ParseError( |
| 260 | - "Unable to parse line {$this->lineNo}\n\"$line\"/" . |
|
| 260 | + "Unable to parse line {$this->lineNo}\n\"$line\"/". |
|
| 261 | 261 | preg_last_error(), |
| 262 | 262 | ); |
| 263 | 263 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | $this->lineNo + 1 < $this->lineCount && |
| 294 | 294 | (!trim($this->lines[$this->lineNo + 1]) || |
| 295 | 295 | preg_match( |
| 296 | - '/^(\s){' . $indent . '}((\s)+[^\s].*)$/', |
|
| 296 | + '/^(\s){'.$indent.'}((\s)+[^\s].*)$/', |
|
| 297 | 297 | $this->lines[$this->lineNo + 1], |
| 298 | 298 | $m, |
| 299 | 299 | )) |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | } |
| 316 | 316 | foreach ($this->indents as $k => $v) { |
| 317 | 317 | if ($v == $indent) { |
| 318 | - $this->indents = array_slice($this->indents, 0, 1 + (int) $k ); |
|
| 318 | + $this->indents = array_slice($this->indents, 0, 1 + (int) $k); |
|
| 319 | 319 | return $k; |
| 320 | 320 | } |
| 321 | 321 | } |