Completed
Push — master ( 29e482...c50087 )
by Arthur
07:40
created
app/Helpers/GoCardlessHelper.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@  discard block
 block discarded – undo
30 30
         ]);
31 31
     }
32 32
 
33
+    /**
34
+     * @return double
35
+     */
33 36
     public function getPayment($paymentId)
34 37
     {
35 38
         return $this->client->payments()->get($paymentId);
@@ -56,6 +59,11 @@  discard block
 block discarded – undo
56 59
     }
57 60
 
58 61
 
62
+    /**
63
+     * @param string|null $mandate
64
+     * @param integer $amount
65
+     * @param string $subscriptionNumber
66
+     */
59 67
     public function createSubscription($mandate, $amount, $dayOfMonth, $subscriptionNumber)
60 68
     {
61 69
         $subscription = $this->client->subscriptions()->create([
@@ -75,6 +83,10 @@  discard block
 block discarded – undo
75 83
 
76 84
         return $subscription;
77 85
     }
86
+
87
+    /**
88
+     * @param string $id
89
+     */
78 90
     public function cancelSubscription($id)
79 91
     {
80 92
         return $this->client->subscriptions()->cancel($id);
Please login to merge, or discard this patch.
app/Repo/UserRepository.php 1 patch
Doc Comments   +12 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,6 +196,9 @@  discard block
 block discarded – undo
196 196
         $this->subscriptionChargeRepository->cancelOutstandingCharges($userId);
197 197
     }
198 198
 
199
+    /**
200
+     * @param integer $userId
201
+     */
199 202
     public function recordGoCardlessMandateDetails($userId, $subscriptionId)
200 203
     {
201 204
         /** @var User $user */
@@ -205,6 +208,11 @@  discard block
 block discarded – undo
205 208
         $user->save();
206 209
     }
207 210
 
211
+    /**
212
+     * @param integer $userId
213
+     * @param string $paymentMethod
214
+     * @param integer $paymentDay
215
+     */
208 216
     public function updateUserPaymentMethod($userId, $paymentMethod, $paymentDay = null)
209 217
     {
210 218
         /** @var User $user */
@@ -216,6 +224,9 @@  discard block
 block discarded – undo
216 224
         $user->save();
217 225
     }
218 226
 
227
+    /**
228
+     * @param integer $userId
229
+     */
219 230
     public function recordGoCardlessSubscription($userId, $subscriptionId, $paymentDay = null)
220 231
     {
221 232
         /** @var User $user */
@@ -230,7 +241,7 @@  discard block
 block discarded – undo
230 241
     /**
231 242
      * Record the fact that the user has agreed to the member induction and the rules
232 243
      *
233
-     * @param $userId
244
+     * @param integer $userId
234 245
      */
235 246
     public function recordInductionCompleted($userId)
236 247
     {
Please login to merge, or discard this patch.
app/Http/Controllers/AccountController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -324,12 +324,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
413 413
 
414 414
         if ($amount < 5) {
415 415
             throw new ValidationException('The minimum subscription is 5 GBP');
416
-        } elseif (!\Auth::user()->isAdmin() && ($amount < 15)) {
416
+        } elseif ( ! \Auth::user()->isAdmin() && ($amount < 15)) {
417 417
             throw new ValidationException('The minimum subscription is 15 GBP, please contact the trustees for a lower amount. [email protected]');
418 418
         }
419 419
 
Please login to merge, or discard this patch.