@@ -45,8 +45,7 @@ |
||
45 | 45 | if(!is_null($value)) |
46 | 46 | { |
47 | 47 | return $attribute . '="' . $value . '"'; |
48 | - } |
|
49 | - elseif(!is_null($fallback)) |
|
48 | + } elseif(!is_null($fallback)) |
|
50 | 49 | { |
51 | 50 | return $attribute . '="' . $fallback . '"'; |
52 | 51 | } |
@@ -52,8 +52,9 @@ discard block |
||
52 | 52 | public function compile($value) |
53 | 53 | { |
54 | 54 | // Only continue is laravel-shortcodes have been registered |
55 | - if(!$this->enabled || !$this->hasShortcodes()) |
|
56 | - return $value; |
|
55 | + if(!$this->enabled || !$this->hasShortcodes()) { |
|
56 | + return $value; |
|
57 | + } |
|
57 | 58 | |
58 | 59 | // Set empty result |
59 | 60 | $result = ''; |
@@ -226,26 +227,21 @@ discard block |
||
226 | 227 | if (!empty($m[1])) |
227 | 228 | { |
228 | 229 | $attributes[strtolower($m[1])] = stripcslashes($m[2]); |
229 | - } |
|
230 | - elseif (!empty($m[3])) |
|
230 | + } elseif (!empty($m[3])) |
|
231 | 231 | { |
232 | 232 | $attributes[strtolower($m[3])] = stripcslashes($m[4]); |
233 | - } |
|
234 | - elseif (!empty($m[5])) |
|
233 | + } elseif (!empty($m[5])) |
|
235 | 234 | { |
236 | 235 | $attributes[strtolower($m[5])] = stripcslashes($m[6]); |
237 | - } |
|
238 | - elseif (isset($m[7]) and strlen($m[7])) |
|
236 | + } elseif (isset($m[7]) and strlen($m[7])) |
|
239 | 237 | { |
240 | 238 | $attributes[] = stripcslashes($m[7]); |
241 | - } |
|
242 | - elseif (isset($m[8])) |
|
239 | + } elseif (isset($m[8])) |
|
243 | 240 | { |
244 | 241 | $attributes[] = stripcslashes($m[8]); |
245 | 242 | } |
246 | 243 | } |
247 | - } |
|
248 | - else |
|
244 | + } else |
|
249 | 245 | { |
250 | 246 | $attributes = ltrim($text); |
251 | 247 | } |
@@ -40,7 +40,9 @@ |
||
40 | 40 | */ |
41 | 41 | public function make($view, $data = array(), $mergeData = array()) |
42 | 42 | { |
43 | - if (isset($this->aliases[$view])) $view = $this->aliases[$view]; |
|
43 | + if (isset($this->aliases[$view])) { |
|
44 | + $view = $this->aliases[$view]; |
|
45 | + } |
|
44 | 46 | |
45 | 47 | $path = $this->finder->find($view); |
46 | 48 |
@@ -25,8 +25,9 @@ |
||
25 | 25 | $state = $this->app['config']->get('laravel-shortcodes::enabled', false); |
26 | 26 | |
27 | 27 | // enable when needed |
28 | - if($state) |
|
29 | - $this->app['shortcode.compiler']->enable(); |
|
28 | + if($state) { |
|
29 | + $this->app['shortcode.compiler']->enable(); |
|
30 | + } |
|
30 | 31 | } |
31 | 32 | |
32 | 33 | /** |