Completed
Push — master ( c01de4...b58729 )
by Arthur
03:29
created
app/Http/Middleware/SSLOnly.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function handle($request, Closure $next)
15 15
     {
16
-        if( ! $request->isSecure() && env('FORCE_SECURE', 'true')) {
16
+        if ( ! $request->isSecure() && env('FORCE_SECURE', 'true')) {
17 17
             if ((strpos($request->path(), 'access-control/') !== 0) && ($request->path() !== 'acs') && ($request->path() !== 'acs/spark')) {
18 18
                 return redirect()->secure($request->path());
19 19
             }
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 Route::post('account/{account}/payment', ['uses' => 'PaymentController@store', 'as' => 'account.payment.store', 'middleware' => 'role:admin']);
74 74
 
75
-Route::group(array('middleware' => 'role:finance'), function() {
75
+Route::group(array('middleware' => 'role:finance'), function () {
76 76
     Route::resource('payments', 'PaymentController', ['only' => ['index', 'destroy', 'update']]);
77 77
     Route::get('payments/overview', ['uses'=>'PaymentOverviewController@index', 'as'=>'payments.overview']);
78 78
     Route::get('payments/sub-charges', ['as' => 'payments.sub-charges', 'uses' => 'SubscriptionController@listCharges']);
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 
93 93
 
94 94
 //Cash
95
-Route::group(array('middleware' => 'role:admin'), function() {
95
+Route::group(array('middleware' => 'role:admin'), function () {
96 96
     Route::post('account/{account}/payment/cash/create', ['as'=>'account.payment.cash.create', 'uses' => 'CashPaymentController@store']);
97 97
     Route::delete('account/{account}/payment/cash', ['as'=>'account.payment.cash.destroy', 'uses' => 'CashPaymentController@destroy']);
98 98
 });
99 99
 
100 100
 # Statements
101
-Route::group(array('middleware' => 'role:finance'), function() {
101
+Route::group(array('middleware' => 'role:finance'), function () {
102 102
     Route::resource('statement-import', 'StatementImportController', ['except' => ['index', 'show', 'edit', 'update', 'destroy']]);
103 103
 });
104 104
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 # Inductions
112 112
 ##########################
113 113
 
114
-Route::group(array('middleware' => 'role:admin'), function() {
114
+Route::group(array('middleware' => 'role:admin'), function () {
115 115
     Route::post('equipment_training/update', ['uses'=>'InductionController@update', 'as'=>'equipment_training.update']);
116 116
     Route::resource('account.induction', 'InductionController', ['only' => ['update', 'destroy']]);
117 117
 });
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 # Equipment
123 123
 ##########################
124 124
 
125
-Route::group(array('middleware' => 'role:member'), function() {
125
+Route::group(array('middleware' => 'role:member'), function () {
126 126
     Route::resource('equipment', 'EquipmentController');
127 127
     Route::post('equipment/{id}/photo', ['uses'=>'EquipmentController@addPhoto', 'as'=>'equipment.photo.store']);
128 128
     Route::delete('equipment/{id}/photo/{key}', ['uses'=>'EquipmentController@destroyPhoto', 'as'=>'equipment.photo.destroy']);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 # Key fobs
146 146
 ##########################
147 147
 
148
-Route::group(array('middleware' => 'role:admin'), function() {
148
+Route::group(array('middleware' => 'role:admin'), function () {
149 149
     Route::resource('keyfob', 'KeyFobController', ['only' => ['index', 'store', 'update', 'destroy']]);
150 150
 });
151 151
 
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 Route::post('camera/event/store', ['uses' => 'CCTVController@store']);
179 179
 Route::post('camera/store', ['uses' => 'CCTVController@storeSingle']);
180 180
 
181
-Route::group(array('middleware' => 'role:admin'), function() {
181
+Route::group(array('middleware' => 'role:admin'), function () {
182 182
     Route::resource('detected_devices', 'DetectedDevicesController');
183 183
 });
184 184
 
185
-Route::group(array('middleware' => 'role:acs'), function() {
185
+Route::group(array('middleware' => 'role:acs'), function () {
186 186
     Route::resource('devices', 'DeviceController');
187 187
 });
188 188
 
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
 # Roles
260 260
 ##########################
261 261
 
262
-Route::group(array('middleware' => 'role:admin'), function() {
262
+Route::group(array('middleware' => 'role:admin'), function () {
263 263
     Route::resource('roles', 'RolesController', []);
264 264
     Route::resource('roles.users', 'RoleUsersController', ['only' => ['destroy', 'store']]);
265 265
 });
266
-Route::group(array('middleware' => 'role:member'), function() {
266
+Route::group(array('middleware' => 'role:member'), function () {
267 267
     Route::resource('groups', 'GroupsController', ['only' => ['index', 'show']]);
268 268
 });
269 269
 
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 # Expenses
283 283
 ##########################
284 284
 
285
-Route::group(array('middleware' => 'role:member'), function() {
285
+Route::group(array('middleware' => 'role:member'), function () {
286 286
     Route::resource('expenses', 'ExpensesController');
287 287
 });
288 288
 
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
 
306 306
 
307 307
 
308
-Route::any('api-docs.json', function() {
308
+Route::any('api-docs.json', function () {
309 309
     $filePath = Config::get('swagger.doc-dir') . "/api-docs.json";
310 310
 
311
-    if (!File::Exists($filePath)) {
311
+    if ( ! File::Exists($filePath)) {
312 312
         App::abort(404, "Cannot find {$filePath}");
313 313
     }
314 314
 
@@ -318,13 +318,13 @@  discard block
 block discarded – undo
318 318
     ));
319 319
 });
320 320
 
321
-Route::get('api-docs', function() {
321
+Route::get('api-docs', function () {
322 322
     if (Config::get('swagger.generateAlways')) {
323
-        $appDir = base_path()."/".Config::get('swagger.app-dir');
323
+        $appDir = base_path() . "/" . Config::get('swagger.app-dir');
324 324
         $docDir = Config::get('swagger.doc-dir');
325 325
 
326 326
 
327
-        if (!File::exists($docDir) || is_writable($docDir)) {
327
+        if ( ! File::exists($docDir) || is_writable($docDir)) {
328 328
             // delete all existing documentation
329 329
             if (File::exists($docDir)) {
330 330
                 File::deleteDirectory($docDir);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
             $excludeDirs = Config::get('swagger.excludes');
336 336
 
337
-            $swagger =  \Swagger\scan($appDir, [
337
+            $swagger = \Swagger\scan($appDir, [
338 338
                 'exclude' => $excludeDirs
339 339
             ]);
340 340
 
Please login to merge, or discard this patch.
app/Helpers/GoCardlessHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
         $this->client = new \GoCardlessPro\Client([
28 28
             'access_token' => env('NEW_GOCARDLESS_ACCESS_TOKEN'),
29
-            'environment' => (env('NEW_GOCARDLESS_ENV', 'LIVE') == 'LIVE')? \GoCardlessPro\Environment::LIVE: \GoCardlessPro\Environment::SANDBOX,
29
+            'environment' => (env('NEW_GOCARDLESS_ENV', 'LIVE') == 'LIVE') ? \GoCardlessPro\Environment::LIVE : \GoCardlessPro\Environment::SANDBOX,
30 30
         ]);
31 31
     }
32 32
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         return $this->client->redirectFlows()->complete(
53 53
             $user->gocardless_setup_id,
54
-            ["params" => ["session_token" => 'user-token-'.$user->id]]
54
+            ["params" => ["session_token" => 'user-token-' . $user->id]]
55 55
         );
56 56
     }
57 57
 
Please login to merge, or discard this patch.
app/Http/Controllers/ACS/ActivityController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
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,
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.
app/Http/Controllers/SubscriptionController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.