@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this->configure($config); |
25 | 25 | |
26 | 26 | $this->setPath(); |
27 | - } |
|
27 | + } |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Configure the plugin. |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | * |
70 | 70 | * @return array |
71 | 71 | */ |
72 | - public function templatePaths() |
|
73 | - { |
|
74 | - $path = $this->path('templates'); |
|
75 | - return [$path]; |
|
76 | - } |
|
72 | + public function templatePaths() |
|
73 | + { |
|
74 | + $path = $this->path('templates'); |
|
75 | + return [$path]; |
|
76 | + } |
|
77 | 77 | |
78 | 78 | /** |
79 | 79 | * Trigger an event callback. This allows |
@@ -6,8 +6,11 @@ discard block |
||
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 |
||
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 |
@@ -15,7 +15,9 @@ |
||
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 | } |
@@ -21,7 +21,9 @@ |
||
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 | } |