@@ -17,7 +17,8 @@ discard block |
||
17 | 17 | { |
18 | 18 | <?php if (empty($table) || empty($action)): ?> |
19 | 19 | // |
20 | -<?php else: ?> |
|
20 | +<?php else { |
|
21 | + : ?> |
|
21 | 22 | $this-><?= $action ?>('<?= $table ?>', function(Structure $table) { |
22 | 23 | <?php if ($session): ?> |
23 | 24 | $table->string('id', 128); |
@@ -28,12 +29,17 @@ discard block |
||
28 | 29 | $table->primary(['id', 'ip_address']); |
29 | 30 | <?php else: ?> |
30 | 31 | $table->primary('id'); |
31 | -<?php endif; ?> |
|
32 | +<?php endif; |
|
33 | +} |
|
34 | +?> |
|
32 | 35 | $table->index('timestamp'); |
33 | -<?php else: ?> |
|
36 | +<?php else { |
|
37 | + : ?> |
|
34 | 38 | $table->id(); |
35 | 39 | $table->timestamps(); |
36 | -<?php endif; ?> |
|
40 | +<?php endif; |
|
41 | +} |
|
42 | +?> |
|
37 | 43 | |
38 | 44 | return $table; |
39 | 45 | }); |
@@ -46,10 +52,13 @@ discard block |
||
46 | 52 | // |
47 | 53 | <?php elseif ($action === 'create') : ?> |
48 | 54 | $this->dropIfExists('<?= $table ?>'); |
49 | -<?php else: ?> |
|
55 | +<?php else { |
|
56 | + : ?> |
|
50 | 57 | $this->modify('<?= $table ?>', function(Structure $table) { |
51 | 58 | // |
52 | 59 | }); |
53 | -<?php endif; ?> |
|
60 | +<?php endif; |
|
61 | +} |
|
62 | +?> |
|
54 | 63 | } |
55 | 64 | } |
@@ -848,8 +848,7 @@ |
||
848 | 848 | |
849 | 849 | try { |
850 | 850 | $response = $response->withBody(to_stream($returned)); |
851 | - } |
|
852 | - catch (InvalidArgumentException $e) { |
|
851 | + } catch (InvalidArgumentException $e) { |
|
853 | 852 | } |
854 | 853 | |
855 | 854 | return $response; |
@@ -37,8 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | try { |
39 | 39 | return Validator::validate($this->all(), $rules, $messages); |
40 | - } |
|
41 | - catch (ValidationException $e) { |
|
40 | + } catch (ValidationException $e) { |
|
42 | 41 | return redirect()->back()->withInput(); |
43 | 42 | } |
44 | 43 | } |
@@ -276,8 +276,7 @@ |
||
276 | 276 | $this->sectionStack[] = $name; |
277 | 277 | |
278 | 278 | ob_start(); |
279 | - } |
|
280 | - else { |
|
279 | + } else { |
|
281 | 280 | $this->sections[$name] = [$content]; |
282 | 281 | } |
283 | 282 | } |
@@ -73,12 +73,10 @@ discard block |
||
73 | 73 | if (! empty($viewPathLocator)) { |
74 | 74 | if (is_string($viewPathLocator)) { |
75 | 75 | $this->viewPath = rtrim($viewPathLocator, '\\/ ') . DS; |
76 | - } |
|
77 | - else if ($viewPathLocator instanceof Locator) { |
|
76 | + } else if ($viewPathLocator instanceof Locator) { |
|
78 | 77 | $this->locator = $viewPathLocator; |
79 | 78 | } |
80 | - } |
|
81 | - else { |
|
79 | + } else { |
|
82 | 80 | $this->locator = Services::locator(); |
83 | 81 | } |
84 | 82 | } |
@@ -225,8 +223,7 @@ discard block |
||
225 | 223 | $viewPath = $options['viewPath'] ?? $this->viewPath; |
226 | 224 | if (! empty($viewPath)) { |
227 | 225 | $file = str_replace('/', DS, rtrim($viewPath, '/\\') . DS . ltrim($view, '/\\')); |
228 | - } |
|
229 | - else { |
|
226 | + } else { |
|
230 | 227 | $file = $view; |
231 | 228 | } |
232 | 229 |