Test Failed
Pull Request — master (#3)
by Chris
02:30
created
php/hamle/Text/Select.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
   function __construct($s) {
32 32
     $s = explode("->", $s, 2);
33 33
     $this->key = $s[0];
34
-    if (count($s) > 1)
35
-      $this->sel = $s[1];
34
+    if (count($s) > 1) {
35
+          $this->sel = $s[1];
36
+    }
36 37
   }
37 38
 }
38 39
\ No newline at end of file
Please login to merge, or discard this patch.
php/hamle/Field/Checkbox.php 2 patches
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,14 +36,18 @@
 block discarded – undo
36 36
   function getInputAttDynamic(&$atts, &$type, &$content) {
37 37
     parent::getInputAttDynamic($atts, $type, $content);
38 38
     $atts['value'] = "ON";
39
-    if ($this->getValue())
40
-      $atts['checked'] = "checked";
39
+    if ($this->getValue()) {
40
+          $atts['checked'] = "checked";
41
+    }
41 42
   }
42 43
 
43 44
   function getValue() {
44
-    if (!is_null($this->setValue)) return $this->setValue;
45
-    if (isset($_REQUEST[$this->form . "__submit"]))
46
-      return isset($_REQUEST[$this->form . "_" . $this->name]);
45
+    if (!is_null($this->setValue)) {
46
+      return $this->setValue;
47
+    }
48
+    if (isset($_REQUEST[$this->form . "__submit"])) {
49
+          return isset($_REQUEST[$this->form . "_" . $this->name]);
50
+    }
47 51
     return $this->opt['default'];
48 52
   }
49 53
 }
50 54
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
 
43 43
   function getValue() {
44 44
     if (!is_null($this->setValue)) return $this->setValue;
45
-    if (isset($_REQUEST[$this->form . "__submit"]))
46
-      return isset($_REQUEST[$this->form . "_" . $this->name]);
45
+    if (isset($_REQUEST[$this->form."__submit"]))
46
+      return isset($_REQUEST[$this->form."_".$this->name]);
47 47
     return $this->opt['default'];
48 48
   }
49 49
 }
50 50
\ No newline at end of file
Please login to merge, or discard this patch.
php/hamle/Model/WrapArray.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@
 block discarded – undo
35 35
   }
36 36
 
37 37
   function hamleGet($key) {
38
-    if (!isset($this->data[$this->pos][$key]))
39
-      return "Missing Key [$key]";
38
+    if (!isset($this->data[$this->pos][$key])) {
39
+          return "Missing Key [$key]";
40
+    }
40 41
     return $this->data[$this->pos][$key];
41 42
   }
42 43
 
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
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
   function __construct($message = "", $code = 0, $previous = NULL) {
34 34
     ///@todo  Include Line number & file name within parse error exceptions
35
-    $message .= ", on line " . Hamle\Hamle::getLineNo() . " in file ?.hamle";
35
+    $message .= ", on line ".Hamle\Hamle::getLineNo()." in file ?.hamle";
36 36
     parent::__construct($message, $code, $previous);
37 37
   }
38 38
 
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
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
   }
43 43
 
44 44
   function isClicked() {
45
-    return isset($_REQUEST[$this->form . "_" . $this->name]);
45
+    return isset($_REQUEST[$this->form."_".$this->name]);
46 46
   }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
php/hamle/Filter/Javascript.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
   }
40 40
 
41 41
   static function filterText($s) {
42
-    return "/*<![CDATA[*/\n" .
42
+    return "/*<![CDATA[*/\n".
43 43
     /*preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \1; ?>', $text)*/
44
-    $s . "/*]]>*/";
44
+    $s."/*]]>*/";
45 45
   }
46 46
 }
47 47
\ No newline at end of file
Please login to merge, or discard this patch.
php/hamle/Text/FormField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
   }
36 36
 
37 37
   function toPHP() {
38
-    return '$form->getField(' . Text::varToCode($this->var) . ')->getValue()';
38
+    return '$form->getField('.Text::varToCode($this->var).')->getValue()';
39 39
   }
40 40
 
41 41
   function toHTML($escape = false) {
42
-    return '<?=' . $this->toPHP() . '?>';
42
+    return '<?='.$this->toPHP().'?>';
43 43
   }
44 44
 }
45 45
\ No newline at end of file
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
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
   }
43 43
 
44 44
   function isClicked() {
45
-    return isset($_REQUEST[$this->form . "_" . $this->name]);
45
+    return isset($_REQUEST[$this->form."_".$this->name]);
46 46
   }
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
php/hamle/Text/Scope.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
   function __construct($s) {
37 37
     $m = [];
38 38
     //var_dump($s);
39
-    if(!preg_match('/\$\[(-?[0-9]+|[a-zA-Z][a-zA-Z0-9]+)\]/', $s, $m)) {
39
+    if (!preg_match('/\$\[(-?[0-9]+|[a-zA-Z][a-zA-Z0-9]+)\]/', $s, $m)) {
40 40
       throw new ParseError("Unable to match scope ($s)");
41 41
     }
42 42
     $this->scope = $m[1];
43 43
   }
44 44
 
45 45
   function toPHP() {
46
-    if(is_numeric($this->scope)) {
47
-      return "Hamle\\Scope::get(" . Text::varToCode($this->scope) . ")";
46
+    if (is_numeric($this->scope)) {
47
+      return "Hamle\\Scope::get(".Text::varToCode($this->scope).")";
48 48
     } else {
49
-      return "Hamle\\Scope::getName(" . Text::varToCode($this->scope) . ")";
49
+      return "Hamle\\Scope::getName(".Text::varToCode($this->scope).")";
50 50
     }
51 51
   }
52 52
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 
62 62
   function getOrCreateModel(Model $parent = null) {
63
-    if(is_numeric($this->scope)) {
63
+    if (is_numeric($this->scope)) {
64 64
       return \Seufert\Hamle\Scope::get($this->scope);
65 65
     }
66 66
     return \Seufert\Hamle\Scope::getName($this->scope);
Please login to merge, or discard this patch.