@@ -35,14 +35,15 @@ |
||
| 35 | 35 | try |
| 36 | 36 | { |
| 37 | 37 | return parent::handle($request, $next); |
| 38 | - } |
|
| 39 | - catch(TokenMismatchException $e) |
|
| 38 | + } catch(TokenMismatchException $e) |
|
| 40 | 39 | { |
| 41 | 40 | $jaxon = App::make(Jaxon::class); |
| 42 | - if($jaxon->canProcessRequest()) // We have an ajax request with Jaxon |
|
| 41 | + if($jaxon->canProcessRequest()) { |
|
| 42 | + // We have an ajax request with Jaxon |
|
| 43 | 43 | { |
| 44 | 44 | throw new AuthenticationException(); |
| 45 | 45 | } |
| 46 | + } |
|
| 46 | 47 | |
| 47 | 48 | throw $e; |
| 48 | 49 | } |
@@ -21,10 +21,12 @@ |
||
| 21 | 21 | protected function unauthenticated($request, array $guards) |
| 22 | 22 | { |
| 23 | 23 | $jaxon = App::make(Jaxon::class); |
| 24 | - if($jaxon->canProcessRequest()) // We have an ajax request with Jaxon |
|
| 24 | + if($jaxon->canProcessRequest()) { |
|
| 25 | + // We have an ajax request with Jaxon |
|
| 25 | 26 | { |
| 26 | 27 | throw new \Siak\Tontine\Exception\AuthenticationException(); |
| 27 | 28 | } |
| 29 | + } |
|
| 28 | 30 | |
| 29 | 31 | throw new AuthenticationException( |
| 30 | 32 | 'Unauthenticated.', $guards, $this->redirectTo($request) |
@@ -196,13 +196,17 @@ |
||
| 196 | 196 | $this->response; |
| 197 | 197 | } |
| 198 | 198 | // Set the missing field in each item of the charge array. |
| 199 | - if($group === self::GROUP_FIXED) // Fixed charge |
|
| 199 | + if($group === self::GROUP_FIXED) { |
|
| 200 | + // Fixed charge |
|
| 200 | 201 | { |
| 201 | 202 | $formValues['type'] = ChargeModel::TYPE_FEE; |
| 202 | 203 | } |
| 203 | - if($group === self::GROUP_VARIABLE) // Variable charge |
|
| 204 | + } |
|
| 205 | + if($group === self::GROUP_VARIABLE) { |
|
| 206 | + // Variable charge |
|
| 204 | 207 | { |
| 205 | 208 | $formValues['period'] = ChargeModel::PERIOD_NONE; |
| 209 | + } |
|
| 206 | 210 | if(empty($formValues['fixed'])) |
| 207 | 211 | { |
| 208 | 212 | $formValues['amount'] = 0; |
@@ -230,8 +230,7 @@ discard block |
||
| 230 | 230 | { |
| 231 | 231 | $disbursement->charge_lendable = $charge->lendable; |
| 232 | 232 | $disbursement->charge()->associate($charge); |
| 233 | - } |
|
| 234 | - else |
|
| 233 | + } else |
|
| 235 | 234 | { |
| 236 | 235 | $disbursement->charge_lendable = true; |
| 237 | 236 | } |
@@ -269,8 +268,7 @@ discard block |
||
| 269 | 268 | if(($member)) |
| 270 | 269 | { |
| 271 | 270 | $disbursement->member()->associate($member); |
| 272 | - } |
|
| 273 | - else |
|
| 271 | + } else |
|
| 274 | 272 | { |
| 275 | 273 | $disbursement->member()->dissociate(); |
| 276 | 274 | } |
@@ -278,8 +276,7 @@ discard block |
||
| 278 | 276 | { |
| 279 | 277 | $disbursement->charge_lendable = $charge->lendable; |
| 280 | 278 | $disbursement->charge()->associate($charge); |
| 281 | - } |
|
| 282 | - else |
|
| 279 | + } else |
|
| 283 | 280 | { |
| 284 | 281 | $disbursement->charge_lendable = true; |
| 285 | 282 | $disbursement->charge()->dissociate(); |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | $pdf = $page->pdf($this->config); |
| 41 | 41 | |
| 42 | 42 | return $pdf->getBase64(); |
| 43 | - } |
|
| 44 | - finally |
|
| 43 | + } finally |
|
| 45 | 44 | { |
| 46 | 45 | $this->browser->close(); |
| 47 | 46 | } |
@@ -137,8 +137,7 @@ |
||
| 137 | 137 | DB::table('pool_session_disabled')->where('pool_id', $pool->id)->delete(); |
| 138 | 138 | // Delete the pool |
| 139 | 139 | $pool->delete(); |
| 140 | - } |
|
| 141 | - catch(Exception $e) |
|
| 140 | + } catch(Exception $e) |
|
| 142 | 141 | { |
| 143 | 142 | throw new MessageException(trans('tontine.errors.action') . |
| 144 | 143 | '<br/>' . trans('tontine.pool.errors.subscription')); |
@@ -97,8 +97,7 @@ |
||
| 97 | 97 | if($pool->remit_auction) |
| 98 | 98 | { |
| 99 | 99 | $subscriptions = collect([]); |
| 100 | - } |
|
| 101 | - else |
|
| 100 | + } else |
|
| 102 | 101 | { |
| 103 | 102 | $subscriptions = $subscriptions->pluck('member.name', 'id')->sort(); |
| 104 | 103 | $subscriptions->prepend('', 0); |
@@ -178,8 +178,7 @@ |
||
| 178 | 178 | $session->disabledPools()->detach(); |
| 179 | 179 | $session->delete(); |
| 180 | 180 | }); |
| 181 | - } |
|
| 182 | - catch(Exception $e) |
|
| 181 | + } catch(Exception $e) |
|
| 183 | 182 | { |
| 184 | 183 | throw new MessageException(trans('tontine.session.errors.delete')); |
| 185 | 184 | } |