@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | $this->configureRateLimiting(); |
| 39 | 39 | |
| 40 | - $this->routes(function () { |
|
| 40 | + $this->routes(function() { |
|
| 41 | 41 | Route::prefix('api') |
| 42 | 42 | ->middleware('api') |
| 43 | 43 | ->namespace($this->namespace) |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function configureRateLimiting() |
| 58 | 58 | { |
| 59 | - RateLimiter::for('api', function (Request $request) { |
|
| 59 | + RateLimiter::for ('api', function(Request $request) { |
|
| 60 | 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -55,13 +55,13 @@ |
||
| 55 | 55 | Fortify::updateUserPasswordsUsing(UpdateUserPassword::class); |
| 56 | 56 | Fortify::resetUserPasswordsUsing(ResetUserPassword::class); |
| 57 | 57 | |
| 58 | - RateLimiter::for('login', function(Request $request) { |
|
| 58 | + RateLimiter::for ('login', function(Request $request) { |
|
| 59 | 59 | $email = (string) $request->email; |
| 60 | 60 | |
| 61 | 61 | return Limit::perMinute(5)->by($email . $request->ip()); |
| 62 | 62 | }); |
| 63 | 63 | |
| 64 | - RateLimiter::for('two-factor', function(Request $request) { |
|
| 64 | + RateLimiter::for ('two-factor', function(Request $request) { |
|
| 65 | 65 | return Limit::perMinute(5)->by($request->session()->get('login.id')); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $html = view('tontine.report.pool', Report::getPoolReport($poolId)); |
| 24 | 24 | |
| 25 | 25 | // Show the html page |
| 26 | - if($request->has('html')) |
|
| 26 | + if ($request->has('html')) |
|
| 27 | 27 | { |
| 28 | 28 | return $html; |
| 29 | 29 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $html = view('tontine.report.session', Report::getSessionReport($sessionId)); |
| 51 | 51 | |
| 52 | 52 | // Show the html page |
| 53 | - if($request->has('html')) |
|
| 53 | + if ($request->has('html')) |
|
| 54 | 54 | { |
| 55 | 55 | return $html; |
| 56 | 56 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | $user = auth()->user(); |
| 30 | 30 | $this->tenantService->setUser($user); |
| 31 | 31 | $tontine = $user->tontines()->find(session('tontine.id', 0)); |
| 32 | - if(!$tontine) |
|
| 32 | + if (!$tontine) |
|
| 33 | 33 | { |
| 34 | 34 | session(['tontine.id' => 0, 'round.id' => 0]); |
| 35 | 35 | return; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $this->tenantService->setTontine($tontine); |
| 39 | 39 | $round = $tontine->rounds()->find(session('round.id', 0)); |
| 40 | - if(!$round) |
|
| 40 | + if (!$round) |
|
| 41 | 41 | { |
| 42 | 42 | session(['round.id' => 0]); |
| 43 | 43 | return; |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -22,8 +22,8 @@ |
||
| 22 | 22 | Validator::make($input, [ |
| 23 | 23 | 'current_password' => ['required', 'string'], |
| 24 | 24 | 'password' => $this->passwordRules(), |
| 25 | - ])->after(function ($validator) use ($user, $input) { |
|
| 26 | - if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) { |
|
| 25 | + ])->after(function($validator) use ($user, $input) { |
|
| 26 | + if (!isset($input['current_password']) || !Hash::check($input['current_password'], $user->password)) { |
|
| 27 | 27 | $validator->errors()->add('current_password', __('The provided password does not match your current password.')); |
| 28 | 28 | } |
| 29 | 29 | })->validateWithBag('updatePassword'); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function register() |
| 36 | 36 | { |
| 37 | - $this->reportable(function (Throwable $e) { |
|
| 37 | + $this->reportable(function(Throwable $e) { |
|
| 38 | 38 | // |
| 39 | 39 | }); |
| 40 | 40 | } |
@@ -59,4 +59,4 @@ |
||
| 59 | 59 | return [$pageNumber, 10]; |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | - |
|
| 63 | 62 | \ No newline at end of file |
| 63 | + |
|
| 64 | 64 | \ No newline at end of file |
@@ -45,12 +45,12 @@ |
||
| 45 | 45 | protected function pageNumber(int $pageNumber, int $itemCount, string $bagName, string $attrName = 'page'): array |
| 46 | 46 | { |
| 47 | 47 | $perPage = 10; |
| 48 | - $pageCount = (int)floor($itemCount / $perPage) + ($itemCount % $perPage > 0 ? 1 : 0); |
|
| 49 | - if($pageNumber > $pageCount) |
|
| 48 | + $pageCount = (int) floor($itemCount / $perPage) + ($itemCount % $perPage > 0 ? 1 : 0); |
|
| 49 | + if ($pageNumber > $pageCount) |
|
| 50 | 50 | { |
| 51 | 51 | $pageNumber = $pageCount; |
| 52 | 52 | } |
| 53 | - if($pageNumber < 1) |
|
| 53 | + if ($pageNumber < 1) |
|
| 54 | 54 | { |
| 55 | 55 | $pageNumber = $this->bag($bagName)->get($attrName, 1); |
| 56 | 56 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'title' => trans('common.actions.cancel'), |
| 73 | 73 | 'class' => 'btn btn-tertiary', |
| 74 | 74 | 'click' => 'close', |
| 75 | - ],[ |
|
| 75 | + ], [ |
|
| 76 | 76 | 'title' => trans('common.actions.add'), |
| 77 | 77 | 'class' => 'btn btn-primary', |
| 78 | 78 | 'click' => $this->rq()->add(pm()->input('text-number')->toInt()), |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function add(int $count) |
| 89 | 89 | { |
| 90 | - if($count <= 0) |
|
| 90 | + if ($count <= 0) |
|
| 91 | 91 | { |
| 92 | 92 | $this->notify->warning(trans('number.errors.invalid')); |
| 93 | 93 | return $this->response; |
| 94 | 94 | } |
| 95 | - if($count > 10) |
|
| 95 | + if ($count > 10) |
|
| 96 | 96 | { |
| 97 | 97 | $this->notify->warning(trans('number.errors.max', ['max' => 10])); |
| 98 | 98 | return $this->response; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->response->html('content-home', $html); |
| 112 | 112 | $this->jq('#btn-cancel')->click($this->rq()->home()); |
| 113 | 113 | $this->jq('#btn-save')->click($this->rq()->create(pm()->form('charge-form'))); |
| 114 | - if($useFaker) |
|
| 114 | + if ($useFaker) |
|
| 115 | 115 | { |
| 116 | 116 | $this->bag('faker')->set('charge.count', $count); |
| 117 | 117 | $this->jq('#btn-fakes')->click($this->cl(Faker::class)->rq()->charges()); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | 'title' => trans('common.actions.cancel'), |
| 147 | 147 | 'class' => 'btn btn-tertiary', |
| 148 | 148 | 'click' => 'close', |
| 149 | - ],[ |
|
| 149 | + ], [ |
|
| 150 | 150 | 'title' => trans('common.actions.save'), |
| 151 | 151 | 'class' => 'btn btn-primary', |
| 152 | 152 | 'click' => $this->rq()->update($charge->id, pm()->form('charge-form')), |