@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | protected function resetPassword(Request $request, array $credentials) |
42 | 42 | { |
43 | - $status = $this->broker()->reset($credentials, function ($user, $password) use ($request) { |
|
43 | + $status = $this->broker()->reset($credentials, function($user, $password) use ($request) { |
|
44 | 44 | $this->updatePassword($user, $password); |
45 | 45 | |
46 | 46 | event(new PasswordReset($user)); |
@@ -46,8 +46,9 @@ discard block |
||
46 | 46 | event(new PasswordReset($user)); |
47 | 47 | }); |
48 | 48 | |
49 | - if ($status === Password::PASSWORD_RESET) |
|
50 | - return $this->getSuccessResponse($request, $status); |
|
49 | + if ($status === Password::PASSWORD_RESET) { |
|
50 | + return $this->getSuccessResponse($request, $status); |
|
51 | + } |
|
51 | 52 | |
52 | 53 | return $this->getFailedResponse($request, $status); |
53 | 54 | } |
@@ -82,8 +83,9 @@ discard block |
||
82 | 83 | { |
83 | 84 | $status = trans($status); |
84 | 85 | |
85 | - if ($request->wantsJson()) |
|
86 | - return new JsonResponse(['message' => $status], JsonResponse::HTTP_OK); |
|
86 | + if ($request->wantsJson()) { |
|
87 | + return new JsonResponse(['message' => $status], JsonResponse::HTTP_OK); |
|
88 | + } |
|
87 | 89 | |
88 | 90 | return redirect() |
89 | 91 | ->to($this->getRedirectUrl()) |
@@ -62,8 +62,9 @@ |
||
62 | 62 | { |
63 | 63 | $status = trans($status); |
64 | 64 | |
65 | - if ($request->wantsJson()) |
|
66 | - return new JsonResponse(['message' => trans($status)], JsonResponse::HTTP_OK); |
|
65 | + if ($request->wantsJson()) { |
|
66 | + return new JsonResponse(['message' => trans($status)], JsonResponse::HTTP_OK); |
|
67 | + } |
|
67 | 68 | |
68 | 69 | return redirect() |
69 | 70 | ->back() |
@@ -25,7 +25,7 @@ |
||
25 | 25 | */ |
26 | 26 | protected static function broker(): PasswordBroker |
27 | 27 | { |
28 | - return with(app('auth.password'), function (PasswordBrokerFactory $manager) { |
|
28 | + return with(app('auth.password'), function(PasswordBrokerFactory $manager) { |
|
29 | 29 | return $manager->broker(static::getBrokerDriver()); |
30 | 30 | }); |
31 | 31 | } |
@@ -82,8 +82,9 @@ |
||
82 | 82 | */ |
83 | 83 | protected function getRegisteredResponse(Request $request, $user) |
84 | 84 | { |
85 | - if ($request->wantsJson()) |
|
86 | - new Response('', Response::HTTP_CREATED); |
|
85 | + if ($request->wantsJson()) { |
|
86 | + new Response('', Response::HTTP_CREATED); |
|
87 | + } |
|
87 | 88 | |
88 | 89 | return redirect()->to($this->redirectUrlAfterRegister($request, $user)); |
89 | 90 | } |
@@ -187,11 +187,13 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function passes($attribute, $value): bool |
189 | 189 | { |
190 | - if ($this->requireUppercase && Str::lower($value) === $value) |
|
191 | - return false; |
|
190 | + if ($this->requireUppercase && Str::lower($value) === $value) { |
|
191 | + return false; |
|
192 | + } |
|
192 | 193 | |
193 | - if ($this->requireNumeric && ! preg_match('/[0-9]/', $value)) |
|
194 | - return false; |
|
194 | + if ($this->requireNumeric && ! preg_match('/[0-9]/', $value)) { |
|
195 | + return false; |
|
196 | + } |
|
195 | 197 | |
196 | 198 | return Str::length($value) >= $this->length; |
197 | 199 | } |
@@ -209,11 +211,9 @@ discard block |
||
209 | 211 | |
210 | 212 | if ($this->requireUppercase && ! $this->requireNumeric) { |
211 | 213 | return __('The :attribute must be at least '.$this->length.' characters and contain at least one uppercase character.'); |
212 | - } |
|
213 | - elseif ($this->requireNumeric && ! $this->requireUppercase) { |
|
214 | + } elseif ($this->requireNumeric && ! $this->requireUppercase) { |
|
214 | 215 | return __('The :attribute must be at least '.$this->length.' characters and contain at least one number.'); |
215 | - } |
|
216 | - elseif ($this->requireUppercase && $this->requireNumeric) { |
|
216 | + } elseif ($this->requireUppercase && $this->requireNumeric) { |
|
217 | 217 | return __('The :attribute must be at least '.$this->length.' characters and contain at least one uppercase character and number.'); |
218 | 218 | } |
219 | 219 |
@@ -63,11 +63,13 @@ |
||
63 | 63 | */ |
64 | 64 | public function handle(Request $request, Closure $next) |
65 | 65 | { |
66 | - if ( ! $this->limiter->isEnabled()) |
|
67 | - return $next($request); |
|
66 | + if ( ! $this->limiter->isEnabled()) { |
|
67 | + return $next($request); |
|
68 | + } |
|
68 | 69 | |
69 | - if ( ! $this->limiter->tooManyAttempts($request)) |
|
70 | - return $next($request); |
|
70 | + if ( ! $this->limiter->tooManyAttempts($request)) { |
|
71 | + return $next($request); |
|
72 | + } |
|
71 | 73 | |
72 | 74 | event(new Lockout($request)); |
73 | 75 |
@@ -53,13 +53,13 @@ |
||
53 | 53 | |
54 | 54 | $this->write( |
55 | 55 | Collection::make($packages) |
56 | - ->mapWithKeys(function ($package) { |
|
56 | + ->mapWithKeys(function($package) { |
|
57 | 57 | return [$this->format($package['name']) => $package['extra']['arcanesoft'] ?? []]; |
58 | 58 | }) |
59 | - ->each(function ($configuration) use (&$ignore) { |
|
59 | + ->each(function($configuration) use (&$ignore) { |
|
60 | 60 | $ignore = array_merge($ignore, $configuration['dont-discover'] ?? []); |
61 | 61 | }) |
62 | - ->reject(function ($configuration, $package) use ($ignore, $ignoreAll) { |
|
62 | + ->reject(function($configuration, $package) use ($ignore, $ignoreAll) { |
|
63 | 63 | return $ignoreAll || in_array($package, $ignore); |
64 | 64 | }) |
65 | 65 | ->filter() |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * @param string|array $name |
27 | 27 | * @param string|null $component |
28 | 28 | */ |
29 | - public function register($name, string $component= null): void; |
|
29 | + public function register($name, string $component = null): void; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * Check if a component is registered. |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | $this->page = $this->resolvePage(); |
42 | 42 | |
43 | - Paginator::currentPageResolver(function () { |
|
43 | + Paginator::currentPageResolver(function() { |
|
44 | 44 | return $this->page; |
45 | 45 | }); |
46 | 46 |