@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | throw new FormValidationException('Error', $validator->errors()); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - $response = Password::sendResetLink($request->only('email'), function(Message $message) |
|
| 36 | + $response = Password::sendResetLink($request->only('email'), function (Message $message) |
|
| 37 | 37 | { |
| 38 | 38 | $message->subject('Reset your password'); |
| 39 | 39 | }); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | //We aren't using a confirm password box so this can be faked |
| 90 | 90 | $credentials['password_confirmation'] = $credentials['password']; |
| 91 | 91 | |
| 92 | - $response = Password::reset($credentials, function($user, $password) { |
|
| 92 | + $response = Password::reset($credentials, function ($user, $password) { |
|
| 93 | 93 | $user->password = $password; |
| 94 | 94 | |
| 95 | 95 | $user->save(); |
@@ -13,7 +13,7 @@ |
||
| 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 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | Route::post('account/{account}/payment', ['uses' => 'PaymentController@store', 'as' => 'account.payment.store', 'middleware' => 'role:admin']); |
| 63 | 63 | |
| 64 | -Route::group(array('middleware' => 'role:finance'), function() { |
|
| 64 | +Route::group(array('middleware' => 'role:finance'), function () { |
|
| 65 | 65 | Route::resource('payments', 'PaymentController', ['only' => ['index', 'destroy', 'update']]); |
| 66 | 66 | Route::get('payments/overview', ['uses'=>'PaymentOverviewController@index', 'as'=>'payments.overview']); |
| 67 | 67 | Route::get('payments/sub-charges', ['as' => 'payments.sub-charges', 'uses' => 'SubscriptionController@listCharges']); |
@@ -80,13 +80,13 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | |
| 82 | 82 | //Cash |
| 83 | -Route::group(array('middleware' => 'role:finance'), function() { |
|
| 83 | +Route::group(array('middleware' => 'role:finance'), function () { |
|
| 84 | 84 | Route::post('account/{account}/payment/cash/create', ['as'=>'account.payment.cash.create', 'uses' => 'CashPaymentController@store']); |
| 85 | 85 | Route::delete('account/{account}/payment/cash', ['as'=>'account.payment.cash.destroy', 'uses' => 'CashPaymentController@destroy']); |
| 86 | 86 | }); |
| 87 | 87 | |
| 88 | 88 | # Statements |
| 89 | -Route::group(array('middleware' => 'role:finance'), function() { |
|
| 89 | +Route::group(array('middleware' => 'role:finance'), function () { |
|
| 90 | 90 | Route::resource('statement-import', 'StatementImportController', ['except' => ['index', 'show', 'edit', 'update', 'destroy']]); |
| 91 | 91 | }); |
| 92 | 92 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | # Inductions |
| 100 | 100 | ########################## |
| 101 | 101 | |
| 102 | -Route::group(array('middleware' => 'role:admin'), function() { |
|
| 102 | +Route::group(array('middleware' => 'role:admin'), function () { |
|
| 103 | 103 | Route::post('equipment_training/update', ['uses'=>'InductionController@update', 'as'=>'equipment_training.update']); |
| 104 | 104 | Route::resource('account.induction', 'InductionController', ['only' => ['update', 'destroy']]); |
| 105 | 105 | }); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | # Equipment |
| 111 | 111 | ########################## |
| 112 | 112 | |
| 113 | -Route::group(array('middleware' => 'role:member'), function() { |
|
| 113 | +Route::group(array('middleware' => 'role:member'), function () { |
|
| 114 | 114 | Route::resource('equipment', 'EquipmentController'); |
| 115 | 115 | Route::post('equipment/{id}/photo', ['uses'=>'EquipmentController@addPhoto', 'as'=>'equipment.photo.store']); |
| 116 | 116 | Route::delete('equipment/{id}/photo/{key}', ['uses'=>'EquipmentController@destroyPhoto', 'as'=>'equipment.photo.destroy']); |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | # Key fobs |
| 134 | 134 | ########################## |
| 135 | 135 | |
| 136 | -Route::group(array('middleware' => 'role:admin'), function() { |
|
| 136 | +Route::group(array('middleware' => 'role:admin'), function () { |
|
| 137 | 137 | Route::resource('keyfob', 'KeyFobController', ['only' => ['index', 'store', 'update', 'destroy']]); |
| 138 | 138 | }); |
| 139 | 139 | |
@@ -165,11 +165,11 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | Route::post('camera/event/store', ['uses' => 'CCTVController@store']); |
| 167 | 167 | |
| 168 | -Route::group(array('middleware' => 'role:admin'), function() { |
|
| 168 | +Route::group(array('middleware' => 'role:admin'), function () { |
|
| 169 | 169 | Route::resource('detected_devices', 'DetectedDevicesController'); |
| 170 | 170 | }); |
| 171 | 171 | |
| 172 | -Route::group(array('middleware' => 'role:acs'), function() { |
|
| 172 | +Route::group(array('middleware' => 'role:acs'), function () { |
|
| 173 | 173 | Route::resource('devices', 'DeviceController'); |
| 174 | 174 | }); |
| 175 | 175 | |
@@ -245,11 +245,11 @@ discard block |
||
| 245 | 245 | # Roles |
| 246 | 246 | ########################## |
| 247 | 247 | |
| 248 | -Route::group(array('middleware' => 'role:admin'), function() { |
|
| 248 | +Route::group(array('middleware' => 'role:admin'), function () { |
|
| 249 | 249 | Route::resource('roles', 'RolesController', []); |
| 250 | 250 | Route::resource('roles.users', 'RoleUsersController', ['only' => ['destroy', 'store']]); |
| 251 | 251 | }); |
| 252 | -Route::group(array('middleware' => 'role:member'), function() { |
|
| 252 | +Route::group(array('middleware' => 'role:member'), function () { |
|
| 253 | 253 | Route::resource('groups', 'GroupsController', ['only' => ['index', 'show']]); |
| 254 | 254 | }); |
| 255 | 255 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | # Expenses |
| 269 | 269 | ########################## |
| 270 | 270 | |
| 271 | -Route::group(array('middleware' => 'role:member'), function() { |
|
| 271 | +Route::group(array('middleware' => 'role:member'), function () { |
|
| 272 | 272 | Route::resource('expenses', 'ExpensesController'); |
| 273 | 273 | }); |
| 274 | 274 | |
@@ -285,10 +285,10 @@ discard block |
||
| 285 | 285 | |
| 286 | 286 | |
| 287 | 287 | |
| 288 | -Route::any('api-docs.json', function() { |
|
| 288 | +Route::any('api-docs.json', function () { |
|
| 289 | 289 | $filePath = Config::get('swagger.doc-dir') . "/api-docs.json"; |
| 290 | 290 | |
| 291 | - if (!File::Exists($filePath)) { |
|
| 291 | + if ( ! File::Exists($filePath)) { |
|
| 292 | 292 | App::abort(404, "Cannot find {$filePath}"); |
| 293 | 293 | } |
| 294 | 294 | |
@@ -298,13 +298,13 @@ discard block |
||
| 298 | 298 | )); |
| 299 | 299 | }); |
| 300 | 300 | |
| 301 | -Route::get('api-docs', function() { |
|
| 301 | +Route::get('api-docs', function () { |
|
| 302 | 302 | if (Config::get('swagger.generateAlways')) { |
| 303 | - $appDir = base_path()."/".Config::get('swagger.app-dir'); |
|
| 303 | + $appDir = base_path() . "/" . Config::get('swagger.app-dir'); |
|
| 304 | 304 | $docDir = Config::get('swagger.doc-dir'); |
| 305 | 305 | |
| 306 | 306 | |
| 307 | - if (!File::exists($docDir) || is_writable($docDir)) { |
|
| 307 | + if ( ! File::exists($docDir) || is_writable($docDir)) { |
|
| 308 | 308 | // delete all existing documentation |
| 309 | 309 | if (File::exists($docDir)) { |
| 310 | 310 | File::deleteDirectory($docDir); |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | $excludeDirs = Config::get('swagger.excludes'); |
| 316 | 316 | |
| 317 | - $swagger = \Swagger\scan($appDir, [ |
|
| 317 | + $swagger = \Swagger\scan($appDir, [ |
|
| 318 | 318 | 'exclude' => $excludeDirs |
| 319 | 319 | ]); |
| 320 | 320 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | namespace BB\Listeners; |
| 4 | 4 | |
| 5 | 5 | use BB\Events\MemberActivity; |
| 6 | -use BB\Repo\ActivityRepository;use Illuminate\Queue\InteractsWithQueue; |
|
| 6 | +use BB\Repo\ActivityRepository; use Illuminate\Queue\InteractsWithQueue; |
|
| 7 | 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
| 8 | 8 | |
| 9 | 9 | class RecordMemberActivity |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function boot(Dispatcher $dispatcher) |
| 15 | 15 | { |
| 16 | - $dispatcher->mapUsing(function($command) |
|
| 16 | + $dispatcher->mapUsing(function ($command) |
|
| 17 | 17 | { |
| 18 | 18 | return Dispatcher::simpleMapping( |
| 19 | 19 | $command, 'BB\Commands', 'BB\Handlers\Commands' |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function map(Router $router) |
| 37 | 37 | { |
| 38 | - $router->group(['namespace' => $this->namespace], function($router) |
|
| 38 | + $router->group(['namespace' => $this->namespace], function ($router) |
|
| 39 | 39 | { |
| 40 | 40 | require app_path('Http/routes.php'); |
| 41 | 41 | }); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | throw new ModelNotFoundException(); |
| 44 | 44 | } |
| 45 | 45 | $node = $this->model->where('api_key', $apiKey)->first(); |
| 46 | - if (!$node) { |
|
| 46 | + if ( ! $node) { |
|
| 47 | 47 | throw new ModelNotFoundException(); |
| 48 | 48 | } |
| 49 | 49 | return $node; |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function logBoot($device) |
| 56 | 56 | { |
| 57 | 57 | $record = $this->model->where('device_id', $device)->first(); |
| 58 | - if (!$record) { |
|
| 58 | + if ( ! $record) { |
|
| 59 | 59 | $record = $this->createRecord($device); |
| 60 | 60 | } |
| 61 | 61 | $record->last_boot = Carbon::now(); |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | } |
| 168 | 168 | }); |
| 169 | 169 | |
| 170 | - return (int) ($totalTime / 60); |
|
| 170 | + return (int)($totalTime / 60); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | { |
| 189 | 189 | $payment = $this->getById($paymentId); |
| 190 | 190 | |
| 191 | - if (!empty($payment->user_id)) { |
|
| 191 | + if ( ! empty($payment->user_id)) { |
|
| 192 | 192 | throw new PaymentException('Payment already assigned to user'); |
| 193 | 193 | } |
| 194 | 194 | |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | */ |
| 267 | 267 | public function getEquipmentFeePayments($referencePrefix) |
| 268 | 268 | { |
| 269 | - return $this->model->where('reason', 'equipment-fee')->get()->filter(function($payment) use($referencePrefix) { |
|
| 269 | + return $this->model->where('reason', 'equipment-fee')->get()->filter(function ($payment) use($referencePrefix) { |
|
| 270 | 270 | return strpos($payment->reference, ':' . $referencePrefix) !== false; |
| 271 | 271 | }); |
| 272 | 272 | } |