@@ -50,7 +50,7 @@ |
||
| 50 | 50 | |
| 51 | 51 | if (!$passes) return 1; |
| 52 | 52 | |
| 53 | - DB::transaction(function () use ($name, $email, $password) { |
|
| 53 | + DB::transaction(function() use ($name, $email, $password) { |
|
| 54 | 54 | $this->save( |
| 55 | 55 | array_merge($this->attributes(), [ |
| 56 | 56 | 'name' => $name, |
@@ -48,7 +48,9 @@ discard block |
||
| 48 | 48 | 'password_confirmation' => $password_confirmation |
| 49 | 49 | ]); |
| 50 | 50 | |
| 51 | - if (!$passes) return 1; |
|
| 51 | + if (!$passes) { |
|
| 52 | + return 1; |
|
| 53 | + } |
|
| 52 | 54 | |
| 53 | 55 | DB::transaction(function () use ($name, $email, $password) { |
| 54 | 56 | $this->save( |
@@ -137,7 +139,9 @@ discard block |
||
| 137 | 139 | */ |
| 138 | 140 | protected function permissions() |
| 139 | 141 | { |
| 140 | - if (is_null($this->permission)) return; |
|
| 142 | + if (is_null($this->permission)) { |
|
| 143 | + return; |
|
| 144 | + } |
|
| 141 | 145 | |
| 142 | 146 | $relation = config('user-commands.permission.relation'); |
| 143 | 147 | |
@@ -156,7 +160,9 @@ discard block |
||
| 156 | 160 | */ |
| 157 | 161 | protected function roles() |
| 158 | 162 | { |
| 159 | - if (is_null($this->role)) return; |
|
| 163 | + if (is_null($this->role)) { |
|
| 164 | + return; |
|
| 165 | + } |
|
| 160 | 166 | |
| 161 | 167 | $relation = config('user-commands.role.relation'); |
| 162 | 168 | |
@@ -36,7 +36,9 @@ |
||
| 36 | 36 | 'password_confirmation' => $password_confirmation |
| 37 | 37 | ]); |
| 38 | 38 | |
| 39 | - if (!$passes) return 1; |
|
| 39 | + if (!$passes) { |
|
| 40 | + return 1; |
|
| 41 | + } |
|
| 40 | 42 | |
| 41 | 43 | $user = $this->getUserModel(); |
| 42 | 44 | |