Passed
Pull Request — master (#3)
by Chris
02:14
created
php/hamle/Setup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     if (!is_dir($dir)) {
49 49
       mkdir($dir);
50 50
     }
51
-    return $dir . $f;
51
+    return $dir.$f;
52 52
   }
53 53
 
54 54
   /**
Please login to merge, or discard this patch.
php/hamle/Field/Button.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/hamle/Field/Checkbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
     if (!is_null($this->setValue)) {
50 50
       return $this->setValue;
51 51
     }
52
-    if (isset($_REQUEST[$this->form . '__submit'])) {
53
-      return isset($_REQUEST[$this->form . '_' . $this->name]);
52
+    if (isset($_REQUEST[$this->form.'__submit'])) {
53
+      return isset($_REQUEST[$this->form.'_'.$this->name]);
54 54
     }
55 55
     return $this->opt['default'];
56 56
   }
Please login to merge, or discard this patch.
php/hamle/TextNode/ScopeName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
   public function toPHP(): string
35 35
   {
36
-    $o = 'Hamle\\Scope::getName(' . Text::varToCode($this->name) . ')';
36
+    $o = 'Hamle\\Scope::getName('.Text::varToCode($this->name).')';
37 37
     if ($this->immediate) {
38 38
       $o = $this->immediate->apply($o);
39 39
     }
Please login to merge, or discard this patch.
php/hamle/TextNode/ModelParam.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
   public function apply(string $out): string
22 22
   {
23
-    $o = "{$out}->hamleGet(" . Text::varToCode($this->name) . ')';
23
+    $o = "{$out}->hamleGet(".Text::varToCode($this->name).')';
24 24
     if ($this->chain) {
25 25
       $o = $this->chain->apply($o);
26 26
     }
Please login to merge, or discard this patch.
php/hamle/TextNode/FilterFunc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     $this->chain = $chain;
23 23
     $this->args = $args;
24 24
     if (method_exists(Filter::class, $func)) {
25
-      $this->func = Filter::class . '::' . $func;
25
+      $this->func = Filter::class.'::'.$func;
26 26
     } elseif (
27 27
       in_array($func, ['round', 'strtoupper', 'strtolower', 'ucfirst'])
28 28
     ) {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
       $this->args,
49 49
     );
50 50
     array_unshift($args, $out);
51
-    $o = "{$this->func}(" . join(',', $args) . ')';
51
+    $o = "{$this->func}(".join(',', $args).')';
52 52
     if ($this->chain) {
53 53
       $o = $this->chain->apply($o);
54 54
     }
Please login to merge, or discard this patch.
php/hamle/TextNode/RelQuery.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     $this->filters = $filters;
21 21
   }
22 22
 
23
-  static function for(string $rel, array $filters)
23
+  static function for (string $rel, array $filters)
24 24
   {
25 25
     return new self(
26 26
       $rel === '>' ? Hamle::REL_CHILD : Hamle::REL_PARENT,
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
   public function apply(string $s): string
32 32
   {
33 33
     $s =
34
-      $s .
35
-      "->hamleRel({$this->rel}," .
36
-      Query::queryParams($this->filters, true) .
34
+      $s.
35
+      "->hamleRel({$this->rel},".
36
+      Query::queryParams($this->filters, true).
37 37
       ')';
38 38
     if ($this->chain) {
39 39
       $s = $this->chain->apply($s);
Please login to merge, or discard this patch.
php/hamle/TextNode/Query.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
       $o = self::queryId($this->filters);
41 41
     } else {
42 42
       $o =
43
-        'Hamle\Run::modelTypeTags(' . self::queryParams($this->filters) . ')';
43
+        'Hamle\Run::modelTypeTags('.self::queryParams($this->filters).')';
44 44
     }
45 45
     if ($this->immediate) {
46 46
       $o = $this->immediate->apply($o);
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
     ];
128 128
     if (!$type || $type === '*') {
129 129
       $opt[0] = Text::varToCode($id);
130
-      return 'Hamle\Run::modelId(' . join(',', $opt) . ')';
130
+      return 'Hamle\Run::modelId('.join(',', $opt).')';
131 131
     }
132
-    return 'Hamle\Run::modelTypeId(' . join(',', $opt) . ')';
132
+    return 'Hamle\Run::modelTypeId('.join(',', $opt).')';
133 133
   }
134 134
 }
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
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     $this->source[] = $ref;
41 41
     $this->baseType = $tag;
42 42
     self::$var++;
43
-    $this->varname = "\$dynhtml" . self::$var;
43
+    $this->varname = "\$dynhtml".self::$var;
44 44
   }
45 45
 
46 46
   function render($indent = 0, $minify = false)
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
       'content' => $this->content,
54 54
     ]);
55 55
     $out =
56
-      '<?php ' .
57
-      $this->varname .
58
-      "=$data; echo Hamle\\Tag\\DynHtml::toStTag(" .
59
-      $this->varname .
56
+      '<?php '.
57
+      $this->varname.
58
+      "=$data; echo Hamle\\Tag\\DynHtml::toStTag(".
59
+      $this->varname.
60 60
       ",\$form).";
61
-    $out .= "implode(\"\\n\"," . $this->varname . "['content']).";
61
+    $out .= "implode(\"\\n\",".$this->varname."['content']).";
62 62
     $out .=
63
-      'Hamle\\Tag\\DynHtml::toEnTag(' .
64
-      $this->varname .
65
-      ",\$form)?>" .
63
+      'Hamle\\Tag\\DynHtml::toEnTag('.
64
+      $this->varname.
65
+      ",\$form)?>".
66 66
       ($minify ? '' : "\n");
67 67
     return $out;
68 68
   }
@@ -79,20 +79,20 @@  discard block
 block discarded – undo
79 79
         ->getField($source)
80 80
         ->getDynamicAtt($d['base'], $d['opt'], $d['type'], $d['content']);
81 81
     }
82
-    $out = '<' . $d['type'] . ' ';
82
+    $out = '<'.$d['type'].' ';
83 83
     foreach ($d['opt'] as $k => $v) {
84 84
       if (is_array($v)) {
85 85
         foreach ($v as $k2 => $v2) {
86 86
           if ($v[$k2] instanceof Text) {
87
-            $v[$k2] = eval('return ' . $v[$k2]->toPHP() . ';');
87
+            $v[$k2] = eval('return '.$v[$k2]->toPHP().';');
88 88
           }
89 89
         }
90 90
         $v = implode(' ', $v);
91 91
       }
92 92
       if ($v instanceof H\Text) {
93
-        $v = eval('return ' . $v->toPHP() . ';');
93
+        $v = eval('return '.$v->toPHP().';');
94 94
       }
95
-      $out .= $k . "=\"" . htmlspecialchars($v) . "\" ";
95
+      $out .= $k."=\"".htmlspecialchars($v)."\" ";
96 96
     }
97 97
     $out .= in_array($d['type'], self::$selfCloseTags) ? '/>' : '>';
98 98
     return $out;
@@ -102,6 +102,6 @@  discard block
 block discarded – undo
102 102
   {
103 103
     return in_array($d['type'], self::$selfCloseTags)
104 104
       ? ''
105
-      : '</' . $d['type'] . '>';
105
+      : '</'.$d['type'].'>';
106 106
   }
107 107
 }
Please login to merge, or discard this patch.