@@ -4,7 +4,6 @@ |
||
| 4 | 4 | use App\Events\Users\RequestedActivationLink; |
| 5 | 5 | use App\Exceptions\Common\NotImplementedException; |
| 6 | 6 | use App\Exceptions\Users\UserAlreadyActivatedException; |
| 7 | -use App\Exceptions\Users\UserNotFoundException; |
|
| 8 | 7 | use App\Http\Controllers\Controller; |
| 9 | 8 | use App\Models\User; |
| 10 | 9 | use App\Traits\Users\Activates; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $validator = app('validator')->make($this->request->all(), [ |
| 45 | 45 | 'name' => 'sometimes|required|max:255', |
| 46 | 46 | 'email' => 'required|email|max:255|unique:users', |
| 47 | - 'password' => 'required|confirmed|min:' . config('auth.passwords.users.min_length'), |
|
| 47 | + 'password' => 'required|confirmed|min:'.config('auth.passwords.users.min_length'), |
|
| 48 | 48 | ]); |
| 49 | 49 | if ($validator->fails()) { |
| 50 | 50 | throw new ValidationException($validator); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | public function delete($id) |
| 131 | 131 | { |
| 132 | 132 | $validator = app('validator')->make($this->request->all(), [ |
| 133 | - 'password' => 'required|min:' . config('auth.passwords.users.min_length'), |
|
| 133 | + 'password' => 'required|min:'.config('auth.passwords.users.min_length'), |
|
| 134 | 134 | ]); |
| 135 | 135 | if ($validator->fails()) { |
| 136 | 136 | throw new ValidationException($validator); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | throw new PasswordNotValidException; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - return (bool)User::destroy($id); |
|
| 144 | + return (bool) User::destroy($id); |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | $validator = app('validator')->make($this->request->all(), [ |
| 173 | 173 | 'name' => 'sometimes|required|max:255', |
| 174 | - 'email' => 'required|email|max:255|unique:users,email,' . $id |
|
| 174 | + 'email' => 'required|email|max:255|unique:users,email,'.$id |
|
| 175 | 175 | ]); |
| 176 | 176 | if ($validator->fails()) { |
| 177 | 177 | throw new ValidationException($validator); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $validator = app('validator')->make($this->request->all(), [ |
| 282 | 282 | 'token' => 'required|string', |
| 283 | 283 | 'email' => 'required|email|max:255', |
| 284 | - 'password' => 'required|confirmed|min:' . app('config')->get('auth.passwords.users.min_length') |
|
| 284 | + 'password' => 'required|confirmed|min:'.app('config')->get('auth.passwords.users.min_length') |
|
| 285 | 285 | ]); |
| 286 | 286 | if ($validator->fails()) { |
| 287 | 287 | throw new ValidationException($validator); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | |
| 292 | 292 | $passwordBroker = app('auth.password.broker'); |
| 293 | 293 | $response = $passwordBroker->reset( |
| 294 | - $credentials, function (User $user, $password) { |
|
| 294 | + $credentials, function(User $user, $password) { |
|
| 295 | 295 | $user->password = app('hash')->make($password); |
| 296 | 296 | $user->save(); |
| 297 | 297 | app('auth.driver')->login($user); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function getCompleted($completed) |
| 40 | 40 | { |
| 41 | - return (bool)$completed; |
|
| 41 | + return (bool) $completed; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | public function setCompleted($completed) |
| 50 | 50 | { |
| 51 | - $this->attributes['completed'] = (bool)$completed; |
|
| 51 | + $this->attributes['completed'] = (bool) $completed; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function getCode() |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | |
| 13 | 13 | $broker = isset($this->broker) ? $this->broker : null; |
| 14 | 14 | app('auth.password')->broker($broker)->sendResetLink( |
| 15 | - ['email' => $user->email], function (Message $message) { |
|
| 15 | + ['email' => $user->email], function(Message $message) { |
|
| 16 | 16 | $message->subject($this->getPasswordResetEmailSubject()); |
| 17 | 17 | } |
| 18 | 18 | ); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('password_resets', function (Blueprint $table) { |
|
| 15 | + Schema::create('password_resets', function(Blueprint $table) { |
|
| 16 | 16 | $table->string('email')->index(); |
| 17 | 17 | $table->string('token')->index(); |
| 18 | 18 | $table->timestamp('created_at'); |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('users_activations', function (Blueprint $table) { |
|
| 15 | + Schema::create('users_activations', function(Blueprint $table) { |
|
| 16 | 16 | $table->engine = 'InnoDB'; |
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->unsignedInteger('user_id'); |