Test Setup Failed
Push — master ( 2f4b22...8919ea )
by Chris
14:41
created
php/hamle/Text/FormField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
 
39 39
   function toPHP(): string
40 40
   {
41
-    return '$form->getField(' . Text::varToCode($this->var) . ')->getValue()';
41
+    return '$form->getField('.Text::varToCode($this->var).')->getValue()';
42 42
   }
43 43
 
44 44
   function toHTML(bool $escape = false): string
45 45
   {
46
-    return '<?=' . $this->toPHP() . '?>';
46
+    return '<?='.$this->toPHP().'?>';
47 47
   }
48 48
 }
Please login to merge, or discard this patch.
php/hamle/Text/Filter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
php/hamle/Text/Comparison.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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':
Please login to merge, or discard this patch.
php/hamle/Filter/Javascript.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
php/hamle/Filter/Sass.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.