Skip to content

Commit 76203bb

Browse files
tabacituStyleCIBot
authored andcommitted
Apply fixes from StyleCI
[ci skip] [skip ci]
1 parent ba6cf7c commit 76203bb

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/BackpackServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Backpack\CRUD;
44

5-
use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
65
use Backpack\CRUD\app\Http\Middleware\ThrottlePasswordRecovery;
6+
use Backpack\CRUD\app\Library\CrudPanel\CrudPanel;
77
use Illuminate\Routing\Router;
88
use Illuminate\Support\Collection;
99
use Illuminate\Support\Facades\App;
@@ -97,7 +97,7 @@ public function registerMiddlewareGroup(Router $router)
9797

9898
// register internal backpack middleware for throttling the password recovery functionality
9999
// but only if functionality is enabled by developer in config
100-
if(config('backpack.base.setup_password_recovery_routes')) {
100+
if (config('backpack.base.setup_password_recovery_routes')) {
101101
$router->aliasMiddleware('backpack.throttle.password.recovery', ThrottlePasswordRecovery::class);
102102
}
103103
}

src/app/Http/Middleware/ThrottlePasswordRecovery.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Illuminate\Routing\Middleware\ThrottleRequests;
66
use Illuminate\Validation\ValidationException;
7-
7+
88
class ThrottlePasswordRecovery extends ThrottleRequests
99
{
1010
/**
@@ -21,6 +21,5 @@ protected function buildException($request, $key, $maxAttempts, $responseCallbac
2121
return ValidationException::withMessages([
2222
'email' => [trans('backpack::passwords.throttled_request')],
2323
]);
24-
2524
}
26-
}
25+
}

src/config/backpack/base.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@
199199

200200
// the ThrottleRequests Laravel middleware is used to prevent abuse from your recovery password functionality.
201201
// here you can configure how many attempts a user can make to recover the password in a given time.
202-
202+
203203
// how much time to wait between password reset request notification ? User should be allow to attempt 1 request every: ? (defaults to 1 request every 60 seconds)
204204
// this is the time to wait for the email to arrive before trying to reset again
205205
'password_recovery_throttle_notifications' => 60, // time in seconds
206-
206+
207207
// how many times in any given time period should the user be allowed to attempt a password reset? (defaults to 2,5 - 2 times every 5 minutes.)
208208
// take into account that user migth wrongly type an email at first, is plausible, so atleast allow one more shoot.
209209
'password_recovery_throttle_access' => '2,5', // 2 - how many times // 5 - interval in minutes

src/resources/lang/pt/passwords.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
return [
44
'throttled' => 'Foi efectuado um pedido de recuperação de password recentemente. Verifique o seu email.',
5-
'throttled_request' => 'Excedeu o limite de tentativas. Aguarde alguns minutos e tente novamente.',
5+
'throttled_request' => 'Excedeu o limite de tentativas. Aguarde alguns minutos e tente novamente.',
66
];

src/routes/backpack/base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function () {
3030
Route::post('register', 'Auth\RegisterController@register');
3131

3232
// if not otherwise configured, setup the password recovery routes
33-
if (config('backpack.base.setup_password_recovery_routes', true)) {
33+
if (config('backpack.base.setup_password_recovery_routes', true)) {
3434
Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('backpack.auth.password.reset');
3535
Route::post('password/reset', 'Auth\ResetPasswordController@reset');
3636
Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('backpack.auth.password.reset.token');

0 commit comments

Comments
 (0)