@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | |
| 75 | 75 | return response()->json([ |
| 76 | - 'activityId' => isset($activityId)? $activityId: null, |
|
| 76 | + 'activityId' => isset($activityId) ? $activityId : null, |
|
| 77 | 77 | 'user' => [ |
| 78 | 78 | 'id' => $keyFob->user->id, |
| 79 | 79 | 'name' => $keyFob->user->name, |
@@ -27,7 +27,8 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | private $equipmentLogRepository; |
| 29 | 29 | |
| 30 | - function __construct(ACSNodeRepository $acsNodeRepository, ACSValidator $ACSValidator, \BB\Services\KeyFobAccess $keyFobAccess, EquipmentLogRepository $equipmentLogRepository) { |
|
| 30 | + function __construct(ACSNodeRepository $acsNodeRepository, ACSValidator $ACSValidator, \BB\Services\KeyFobAccess $keyFobAccess, EquipmentLogRepository $equipmentLogRepository) |
|
| 31 | + { |
|
| 31 | 32 | $this->acsNodeRepository = $acsNodeRepository; |
| 32 | 33 | $this->ACSValidator = $ACSValidator; |
| 33 | 34 | $this->keyFobAccess = $keyFobAccess; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $payment_details = array( |
| 38 | 38 | "description" => "Build Brighton", |
| 39 | 39 | 'success_redirect_url' => route('account.subscription.store', $user->id), |
| 40 | - "session_token" => 'user-token-'.$user->id, |
|
| 40 | + "session_token" => 'user-token-' . $user->id, |
|
| 41 | 41 | 'prefilled_customer' => [ |
| 42 | 42 | 'given_name' => $user->given_name, |
| 43 | 43 | 'family_name' => $user->family_name, |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
| 85 | - if (!isset($confirmed_resource->links->mandate) || empty($confirmed_resource->links->mandate)) { |
|
| 85 | + if ( ! isset($confirmed_resource->links->mandate) || empty($confirmed_resource->links->mandate)) { |
|
| 86 | 86 | \Notification::error('Something went wrong, you can try again or get in contact'); |
| 87 | 87 | return \Redirect::route('account.show', $user->id); |
| 88 | 88 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | if ($paymentMethod === 'balance' && empty($user->payment_method) && in_array($user->status, ['setting-up', 'left', 'leaving'])) { |
| 161 | 161 | // Activate a users membership with a payment method of balance |
| 162 | - $user->payment_method = 'balance'; |
|
| 162 | + $user->payment_method = 'balance'; |
|
| 163 | 163 | $user->secondary_payment_method = null; |
| 164 | 164 | $user->payment_day = Carbon::now()->day; |
| 165 | 165 | $user->save(); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | if ($paymentMethod === 'balance' && $user->payment_method == 'gocardless-variable') { |
| 171 | - $user->payment_method = 'balance'; |
|
| 171 | + $user->payment_method = 'balance'; |
|
| 172 | 172 | $user->secondary_payment_method = 'gocardless-variable'; |
| 173 | 173 | $user->save(); |
| 174 | 174 | } |
@@ -324,12 +324,12 @@ discard block |
||
| 324 | 324 | if (\Input::has('experimental_dd_subscription')) { |
| 325 | 325 | $subscription = $this->goCardless->createSubscription($user->mandate_id, $user->monthly_subscription * 100, $user->payment_day, 'NEW-BBSUB' . $user->id); |
| 326 | 326 | |
| 327 | - $this->userRepository->recordGoCardlessSubscription($user->id, $subscription->id); |
|
| 327 | + $this->userRepository->recordGoCardlessSubscription($user->id, $subscription->id); |
|
| 328 | 328 | } |
| 329 | 329 | if (\Input::has('cancel_experimental_dd_subscription')) { |
| 330 | 330 | $this->goCardless->cancelSubscription($user->subscription_id); |
| 331 | 331 | |
| 332 | - $this->userRepository->recordGoCardlessSubscription($user->id, null); |
|
| 332 | + $this->userRepository->recordGoCardlessSubscription($user->id, null); |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | |
| 414 | 414 | if ($amount < 5) { |
| 415 | 415 | throw new ValidationException('The minimum subscription is 5 GBP'); |
| 416 | - } elseif (!\Auth::user()->isAdmin() && ($amount < 20)) { |
|
| 416 | + } elseif ( ! \Auth::user()->isAdmin() && ($amount < 20)) { |
|
| 417 | 417 | throw new ValidationException('The minimum subscription is 20 GBP, please contact the trustees for a lower amount. [email protected]'); |
| 418 | 418 | } |
| 419 | 419 | |