Completed
Push — master ( 0d570f...8e8346 )
by Helmut
05:09
created
src/Utility/Validate.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,11 @@  discard block
 block discarded – undo
6 6
     
7 7
     public static function required($var) 
8 8
     {
9
-        if (is_null($var)) return false;
10
-        else if (is_string($var) && trim($var) === '') return false;
9
+        if (is_null($var)) {
10
+            return false;
11
+        } else if (is_string($var) && trim($var) === '') {
12
+            return false;
13
+        }
11 14
         return true;
12 15
     }
13 16
 
@@ -28,13 +31,17 @@  discard block
 block discarded – undo
28 31
 
29 32
     public static function alphaNum($var)
30 33
     {
31
-        if ( ! is_string($var) && ! is_numeric($var)) return false;
34
+        if ( ! is_string($var) && ! is_numeric($var)) {
35
+            return false;
36
+        }
32 37
         return preg_match('/^[\pL\pM\pN]+$/u', $var);
33 38
     }
34 39
 
35 40
     public static function alphaDash($var)
36 41
     {
37
-        if ( ! is_string($var) && ! is_numeric($var)) return false;
42
+        if ( ! is_string($var) && ! is_numeric($var)) {
43
+            return false;
44
+        }
38 45
         return preg_match('/^[\pL\pM\pN_-]+$/u', $var);
39 46
     }
40 47
 
Please login to merge, or discard this patch.
src/Engines/Blade.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function render($path, $properties = []) 
17 17
     {
18
-        if ( ! function_exists('app')) throw new \Exception('Laravel required for blade rendering engine.');
18
+        if ( ! function_exists('app')) {
19
+            throw new \Exception('Laravel required for blade rendering engine.');
20
+        }
19 21
 
20 22
         return app()->make('view')->file($path, $properties);
21 23
     }
Please login to merge, or discard this patch.
src/Engines/Mustache.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
      */
22 22
     public function compiler()
23 23
     {
24
-        if ( ! $this->compiler) $this->compiler = new Mustache_Engine;
24
+        if ( ! $this->compiler) {
25
+            $this->compiler = new Mustache_Engine;
26
+        }
25 27
 
26 28
         return $this->compiler;
27 29
     }
Please login to merge, or discard this patch.
src/Fields/Email/Email.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function setValueFromModel($model)
33 33
     {
34
-        if (isset($model->{$this->name})) $this->value = $model->{$this->name};
34
+        if (isset($model->{$this->name})) {
35
+            $this->value = $model->{$this->name};
36
+        }
35 37
     }
36 38
 
37 39
     public function setValueFromRequest($request)
Please login to merge, or discard this patch.
src/Fields/Name/Name.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,15 +38,23 @@
 block discarded – undo
38 38
 
39 39
     public function setValueFromDefault()
40 40
     {
41
-        if (isset($this->default['first'])) $this->value_first = $this->default['first'];
42
-        if (isset($this->default['surname'])) $this->value_surname = $this->default['surname'];
41
+        if (isset($this->default['first'])) {
42
+            $this->value_first = $this->default['first'];
43
+        }
44
+        if (isset($this->default['surname'])) {
45
+            $this->value_surname = $this->default['surname'];
46
+        }
43 47
         $this->value = trim($this->value_first.' '.$this->value_surname);
44 48
     }
45 49
 
46 50
     public function setValueFromModel($model)
47 51
     {
48
-        if (isset($model->{$this->name.'_first'})) $this->value_first = $model->{$this->name.'_first'};
49
-        if (isset($model->{$this->name.'_surname'})) $this->value_surname = $model->{$this->name.'_surname'};
52
+        if (isset($model->{$this->name.'_first'})) {
53
+            $this->value_first = $model->{$this->name.'_first'};
54
+        }
55
+        if (isset($model->{$this->name.'_surname'})) {
56
+            $this->value_surname = $model->{$this->name.'_surname'};
57
+        }
50 58
         $this->value = trim($this->value_first.' '.$this->value_surname);
51 59
     }
52 60
 
Please login to merge, or discard this patch.
src/Fields/Dropdown/Dropdown.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
 
52 52
     public function setValueFromModel($model)
53 53
     {
54
-        if (isset($model->{$this->name})) $this->value = $model->{$this->name};
54
+        if (isset($model->{$this->name})) {
55
+            $this->value = $model->{$this->name};
56
+        }
55 57
     }   
56 58
 
57 59
     public function setValueFromRequest($request)
Please login to merge, or discard this patch.
src/Fields/Text/Text.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function setValueFromModel($model)
33 33
     {
34
-        if (isset($model->{$this->name})) $this->value = $model->{$this->name};
34
+        if (isset($model->{$this->name})) {
35
+            $this->value = $model->{$this->name};
36
+        }
35 37
     }
36 38
 
37 39
     public function setValueFromRequest($request)
Please login to merge, or discard this patch.
src/Fields/ParagraphText/ParagraphText.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function setValueFromModel($model)
33 33
     {
34
-        if (isset($model->{$this->name})) $this->value = $model->{$this->name};
34
+        if (isset($model->{$this->name})) {
35
+            $this->value = $model->{$this->name};
36
+        }
35 37
     }
36 38
 
37 39
     public function setValueFromRequest($request)
Please login to merge, or discard this patch.
src/Fields/Search/Search.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@
 block discarded – undo
31 31
 
32 32
     public function setValueFromModel($model)
33 33
     {
34
-        if (isset($model->{$this->name})) $this->value = $model->{$this->name};
34
+        if (isset($model->{$this->name})) {
35
+            $this->value = $model->{$this->name};
36
+        }
35 37
     }
36 38
 
37 39
     public function setValueFromRequest($request)
Please login to merge, or discard this patch.