@@ -15,10 +15,11 @@ |
||
15 | 15 | $recaptcha = new ReCaptcha($secret); |
16 | 16 | $resp = $recaptcha->verify($response, $remoteip); |
17 | 17 | |
18 | - if ($resp->isSuccess()) |
|
19 | - return true; |
|
20 | - else |
|
21 | - return false; |
|
18 | + if ($resp->isSuccess()) { |
|
19 | + return true; |
|
20 | + } else { |
|
21 | + return false; |
|
22 | + } |
|
22 | 23 | } |
23 | 24 | |
24 | 25 | } |
25 | 26 | \ No newline at end of file |
@@ -106,8 +106,9 @@ |
||
106 | 106 | // If no name was specified for this index, we will create one using a basic |
107 | 107 | // convention of the table name, followed by the columns, followed by an |
108 | 108 | // index type, such as primary or index, which makes the index unique. |
109 | - if (is_null($index)) |
|
110 | - $index = $this->createIndexName($type, $columns); |
|
109 | + if (is_null($index)) { |
|
110 | + $index = $this->createIndexName($type, $columns); |
|
111 | + } |
|
111 | 112 | return $this->addCommand($type, compact('index', 'columns', 'length')); |
112 | 113 | } |
113 | 114 |
@@ -122,8 +122,7 @@ |
||
122 | 122 | if ( isset($command->length) ) |
123 | 123 | { |
124 | 124 | $column .= "({$command->length})"; |
125 | - } |
|
126 | - elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 ) |
|
125 | + } elseif ( 'string' == $blueprintColumn->type && $blueprintColumn->length > 255 ) |
|
127 | 126 | { |
128 | 127 | $column .= '(255)'; |
129 | 128 | } |
@@ -59,8 +59,9 @@ discard block |
||
59 | 59 | return (!(stripos($var, 'jlourenco.') === false) && $var != 'jlourenco.php'); |
60 | 60 | }); |
61 | 61 | |
62 | - if ($fileExists) |
|
63 | - unlink($mainFile); |
|
62 | + if ($fileExists) { |
|
63 | + unlink($mainFile); |
|
64 | + } |
|
64 | 65 | |
65 | 66 | touch($mainFile); |
66 | 67 | |
@@ -73,8 +74,9 @@ discard block |
||
73 | 74 | |
74 | 75 | while ($line = fgets($in)) |
75 | 76 | { |
76 | - if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) |
|
77 | - $content .= $line; |
|
77 | + if ((stripos($line, '<?php') === false) && (stripos($line, '];') === false) && (stripos($line, 'return [') === false)) { |
|
78 | + $content .= $line; |
|
79 | + } |
|
78 | 80 | } |
79 | 81 | |
80 | 82 | fclose($in); |
@@ -85,8 +87,9 @@ discard block |
||
85 | 87 | $content .= "];\n"; |
86 | 88 | |
87 | 89 | $bytesWritten = File::append($mainFile, $content); |
88 | - if ($bytesWritten === false) |
|
89 | - die("Couldn't write to config file."); |
|
90 | + if ($bytesWritten === false) { |
|
91 | + die("Couldn't write to config file."); |
|
92 | + } |
|
90 | 93 | |
91 | 94 | $this->info('Config files compiled'); |
92 | 95 | } |
@@ -14,10 +14,11 @@ discard block |
||
14 | 14 | |
15 | 15 | // create a event to happen on deleting |
16 | 16 | static::deleting(function($table) { |
17 | - if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel')) |
|
18 | - $table->deleted_by = Sentinel::getUser()->id; |
|
19 | - else |
|
20 | - $table->deleted_by = Auth::user()->id; |
|
17 | + if (class_exists('Cartalyst\Sentinel\Laravel\Facades\Sentinel')) { |
|
18 | + $table->deleted_by = Sentinel::getUser()->id; |
|
19 | + } else { |
|
20 | + $table->deleted_by = Auth::user()->id; |
|
21 | + } |
|
21 | 22 | }); |
22 | 23 | |
23 | 24 | // create a event to happen on saving |
@@ -27,15 +28,16 @@ discard block |
||
27 | 28 | { |
28 | 29 | $table->modified_by = Sentinel::getUser()->id; |
29 | 30 | |
30 | - if (Sentinel::check() && ($table->created_by == null || !($table->created_by > 0))) |
|
31 | - $table->created_by = Sentinel::getUser()->id; |
|
32 | - } |
|
33 | - else |
|
31 | + if (Sentinel::check() && ($table->created_by == null || !($table->created_by > 0))) { |
|
32 | + $table->created_by = Sentinel::getUser()->id; |
|
33 | + } |
|
34 | + } else |
|
34 | 35 | { |
35 | 36 | $table->modified_by = Auth::user()->id; |
36 | 37 | |
37 | - if (!Auth::guest() && ($table->created_by == null || !($table->created_by > 0))) |
|
38 | - $table->created_by = Auth::user()->id; |
|
38 | + if (!Auth::guest() && ($table->created_by == null || !($table->created_by > 0))) { |
|
39 | + $table->created_by = Auth::user()->id; |
|
40 | + } |
|
39 | 41 | } |
40 | 42 | |
41 | 43 | }); |