Passed
Push — master ( bcbbc0...c25975 )
by Chris
12:58 queued 07:01
created
php/hamle/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
   function setup()
48 48
   {
49 49
     throw new Exception\RunTime(
50
-      'You must configure the form in the setup ' .
50
+      'You must configure the form in the setup '.
51 51
         "function, by adding fields to the \$this->fields array",
52 52
     );
53 53
   }
Please login to merge, or discard this patch.
php/hamle/Scope.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
   {
26 26
     if (!$model instanceof Model) {
27 27
       throw new Unsupported(
28
-        'Unsupported Model (' .
29
-          get_class($model) .
28
+        'Unsupported Model ('.
29
+          get_class($model).
30 30
           '), Needs to implement hamleModel Interface',
31 31
       );
32 32
     }
Please login to merge, or discard this patch.
php/hamle/Field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,15 +132,15 @@  discard block
 block discarded – undo
132 132
     if (!is_null($this->setValue)) {
133 133
       return $this->setValue;
134 134
     }
135
-    if (isset($_REQUEST[$this->form . '_' . $this->name])) {
136
-      return $_REQUEST[$this->form . '_' . $this->name];
135
+    if (isset($_REQUEST[$this->form.'_'.$this->name])) {
136
+      return $_REQUEST[$this->form.'_'.$this->name];
137 137
     }
138 138
     return $this->opt['default'];
139 139
   }
140 140
 
141 141
   function getInputAttStatic(&$atts, &$type, &$content)
142 142
   {
143
-    $atts['id'] = $atts['name'] = $this->form . '_' . $this->name;
143
+    $atts['id'] = $atts['name'] = $this->form.'_'.$this->name;
144 144
     $atts['type'] = 'text';
145 145
     $atts['class'][] = str_replace(
146 146
       ['Seufert\\', '\\'],
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
       ['', '_'],
175 175
       get_class($this),
176 176
     );
177
-    $atts['for'] = $this->form . '_' . $this->name;
177
+    $atts['for'] = $this->form.'_'.$this->name;
178 178
     $content = [$this->opt['label']];
179 179
   }
180 180
 
Please login to merge, or discard this patch.
php/hamle/Tag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
   {
159 159
     $ind = $minify ? '' : str_pad('', $indent);
160 160
     $oneliner = !(count($this->content) > 1 || $this->tags);
161
-    $out = $ind . $this->renderStTag() . ($oneliner || $minify ? '' : "\n");
161
+    $out = $ind.$this->renderStTag().($oneliner || $minify ? '' : "\n");
162 162
     if ($this->content) {
163 163
       $out .= $this->renderContent($ind, $oneliner || $minify);
164 164
     }
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
       $out .= $tag->render($indent + self::INDENT_SIZE, $minify);
167 167
     }
168 168
     $out .=
169
-      ($minify || $oneliner ? '' : $ind) .
170
-      $this->renderEnTag() .
169
+      ($minify || $oneliner ? '' : $ind).
170
+      $this->renderEnTag().
171 171
       ($minify ? '' : "\n");
172 172
     return $out;
173 173
   }
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
   {
184 184
     $out = '';
185 185
     foreach ($this->content as $c) {
186
-      $out .= ($oneliner ? '' : $pad) . $c . ($oneliner ? '' : "\n");
186
+      $out .= ($oneliner ? '' : $pad).$c.($oneliner ? '' : "\n");
187 187
     }
188 188
     return $out;
189 189
   }
Please login to merge, or discard this patch.
php/hamle/Field/Memo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,6 +37,6 @@
 block discarded – undo
37 37
 
38 38
   function isClicked()
39 39
   {
40
-    return isset($_REQUEST[$this->form . '_' . $this->name]);
40
+    return isset($_REQUEST[$this->form.'_'.$this->name]);
41 41
   }
42 42
 }
Please login to merge, or discard this patch.
php/autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
  * @param string $class Class name to be autoloaded
35 35
  */
36 36
 spl_autoload_register(
37
-  function ($class) {
37
+  function($class) {
38 38
     if (strpos($class, 'Seufert\\Hamle\\') === 0) {
39 39
       $s = DIRECTORY_SEPARATOR;
40 40
       $class = str_replace('\\', $s, substr($class, 14));
41
-      $path = __DIR__ . $s . 'hamle' . $s . "$class.php";
41
+      $path = __DIR__.$s.'hamle'.$s."$class.php";
42 42
       if (is_file($path)) {
43 43
         include_once $path;
44 44
       }
Please login to merge, or discard this patch.
php/hamle/Exception/ParseError.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     Throwable $previous = null
38 38
   ) {
39 39
     ///@todo  Include Line number & file name within parse error exceptions
40
-    $message .= ', on line ' . Hamle\Hamle::getLineNo() . ' in file ?.hamle';
40
+    $message .= ', on line '.Hamle\Hamle::getLineNo().' in file ?.hamle';
41 41
     parent::__construct($message, $code, $previous);
42 42
   }
43 43
 }
Please login to merge, or discard this patch.
php/hamle/Tag/DynHtml.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     $this->source[] = $ref;
46 46
     $this->baseType = $tag;
47 47
     self::$var++;
48
-    $this->varname = "\$dynhtml" . self::$var;
48
+    $this->varname = "\$dynhtml".self::$var;
49 49
   }
50 50
 
51 51
   function render(int $indent = 0, bool $minify = false): string
@@ -58,16 +58,16 @@  discard block
 block discarded – undo
58 58
       'content' => $this->content,
59 59
     ]);
60 60
     $out =
61
-      '<?php ' .
62
-      $this->varname .
63
-      "=$data; echo Hamle\\Tag\\DynHtml::toStTag(" .
64
-      $this->varname .
61
+      '<?php '.
62
+      $this->varname.
63
+      "=$data; echo Hamle\\Tag\\DynHtml::toStTag(".
64
+      $this->varname.
65 65
       ",\$form).";
66
-    $out .= "implode(\"\\n\"," . $this->varname . "['content']).";
66
+    $out .= "implode(\"\\n\",".$this->varname."['content']).";
67 67
     $out .=
68
-      'Hamle\\Tag\\DynHtml::toEnTag(' .
69
-      $this->varname .
70
-      ",\$form)?>" .
68
+      'Hamle\\Tag\\DynHtml::toEnTag('.
69
+      $this->varname.
70
+      ",\$form)?>".
71 71
       ($minify ? '' : "\n");
72 72
     return $out;
73 73
   }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         ->getField($source)
85 85
         ->getDynamicAtt($d['base'], $d['opt'], $d['type'], $d['content']);
86 86
     }
87
-    $out = '<' . $d['type'] . ' ';
87
+    $out = '<'.$d['type'].' ';
88 88
     foreach ($d['opt'] as $k => $v) {
89 89
       if (is_array($v)) {
90 90
         foreach ($v as $k2 => $v2) {
@@ -92,15 +92,15 @@  discard block
 block discarded – undo
92 92
             /**
93 93
              * @psalm-suppress UndefinedMethod
94 94
              */
95
-            $v[$k2] = eval('return ' . $v[$k2]->toPHP() . ';');
95
+            $v[$k2] = eval('return '.$v[$k2]->toPHP().';');
96 96
           }
97 97
         }
98 98
         $v = implode(' ', $v);
99 99
       }
100 100
       if ($v instanceof H\Text) {
101
-        $v = eval('return ' . $v->toPHP() . ';');
101
+        $v = eval('return '.$v->toPHP().';');
102 102
       }
103
-      $out .= $k . "=\"" . htmlspecialchars($v) . "\" ";
103
+      $out .= $k."=\"".htmlspecialchars($v)."\" ";
104 104
     }
105 105
     $out .= in_array($d['type'], self::$selfCloseTags) ? '/>' : '>';
106 106
     return $out;
@@ -110,6 +110,6 @@  discard block
 block discarded – undo
110 110
   {
111 111
     return in_array($d['type'], self::$selfCloseTags)
112 112
       ? ''
113
-      : '</' . $d['type'] . '>';
113
+      : '</'.$d['type'].'>';
114 114
   }
115 115
 }
Please login to merge, or discard this patch.
php/hamle/Tag/Html.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
   function renderStTag(): string
85 85
   {
86 86
     $close = in_array($this->type, self::$selfCloseTags) ? ' />' : '>';
87
-    return "<{$this->type}" . $this->optToTags() . $close;
87
+    return "<{$this->type}".$this->optToTags().$close;
88 88
   }
89 89
 
90 90
   function renderEnTag(): string
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $v = new H\Text($v ?? '');
115 115
       }
116 116
       $k = new H\Text($k);
117
-      $out[] = ' ' . $k->toHTML() . "=\"" . $v->toHTMLAtt() . "\"";
117
+      $out[] = ' '.$k->toHTML()."=\"".$v->toHTMLAtt()."\"";
118 118
     }
119 119
     return implode('', $out);
120 120
   }
Please login to merge, or discard this patch.