@@ -4,6 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | abstract class Request extends FormRequest { |
| 6 | 6 | |
| 7 | - // |
|
| 7 | + // |
|
| 8 | 8 | |
| 9 | 9 | } |
@@ -2,7 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Foundation\Http\FormRequest; |
| 4 | 4 | |
| 5 | -abstract class Request extends FormRequest { |
|
| 5 | +abstract class Request extends FormRequest |
|
| 6 | +{ |
|
| 6 | 7 | |
| 7 | 8 | // |
| 8 | 9 | |
@@ -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 |
@@ -28,8 +28,7 @@ |
||
| 28 | 28 | if (\App::environment('production')) { |
| 29 | 29 | |
| 30 | 30 | //If the user doesn't have a slack username registered there is nothing we can do |
| 31 | - if (empty($event->notification->user()->slack_username)) |
|
| 32 | - { |
|
| 31 | + if (empty($event->notification->user()->slack_username)) { |
|
| 33 | 32 | return; |
| 34 | 33 | } |
| 35 | 34 | |
@@ -4,31 +4,31 @@ |
||
| 4 | 4 | |
| 5 | 5 | class AppServiceProvider extends ServiceProvider { |
| 6 | 6 | |
| 7 | - /** |
|
| 8 | - * Bootstrap any application services. |
|
| 9 | - * |
|
| 10 | - * @return void |
|
| 11 | - */ |
|
| 12 | - public function boot() |
|
| 13 | - { |
|
| 14 | - // |
|
| 15 | - } |
|
| 7 | + /** |
|
| 8 | + * Bootstrap any application services. |
|
| 9 | + * |
|
| 10 | + * @return void |
|
| 11 | + */ |
|
| 12 | + public function boot() |
|
| 13 | + { |
|
| 14 | + // |
|
| 15 | + } |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Register any application services. |
|
| 19 | - * |
|
| 20 | - * This service provider is a great spot to register your various container |
|
| 21 | - * bindings with the application. As you can see, we are registering our |
|
| 22 | - * "Registrar" implementation here. You can add your own bindings too! |
|
| 23 | - * |
|
| 24 | - * @return void |
|
| 25 | - */ |
|
| 26 | - public function register() |
|
| 27 | - { |
|
| 28 | - $this->app->bind( |
|
| 29 | - 'Illuminate\Contracts\Auth\Registrar', |
|
| 30 | - 'BB\Services\Registrar' |
|
| 31 | - ); |
|
| 32 | - } |
|
| 17 | + /** |
|
| 18 | + * Register any application services. |
|
| 19 | + * |
|
| 20 | + * This service provider is a great spot to register your various container |
|
| 21 | + * bindings with the application. As you can see, we are registering our |
|
| 22 | + * "Registrar" implementation here. You can add your own bindings too! |
|
| 23 | + * |
|
| 24 | + * @return void |
|
| 25 | + */ |
|
| 26 | + public function register() |
|
| 27 | + { |
|
| 28 | + $this->app->bind( |
|
| 29 | + 'Illuminate\Contracts\Auth\Registrar', |
|
| 30 | + 'BB\Services\Registrar' |
|
| 31 | + ); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | } |
@@ -2,7 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Support\ServiceProvider; |
| 4 | 4 | |
| 5 | -class AppServiceProvider extends ServiceProvider { |
|
| 5 | +class AppServiceProvider extends ServiceProvider |
|
| 6 | +{ |
|
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * Bootstrap any application services. |
@@ -5,30 +5,30 @@ |
||
| 5 | 5 | |
| 6 | 6 | class BusServiceProvider extends ServiceProvider { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Bootstrap any application services. |
|
| 10 | - * |
|
| 11 | - * @param \Illuminate\Bus\Dispatcher $dispatcher |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function boot(Dispatcher $dispatcher) |
|
| 15 | - { |
|
| 16 | - $dispatcher->mapUsing(function($command) |
|
| 17 | - { |
|
| 18 | - return Dispatcher::simpleMapping( |
|
| 19 | - $command, 'BB\Commands', 'BB\Handlers\Commands' |
|
| 20 | - ); |
|
| 21 | - }); |
|
| 22 | - } |
|
| 8 | + /** |
|
| 9 | + * Bootstrap any application services. |
|
| 10 | + * |
|
| 11 | + * @param \Illuminate\Bus\Dispatcher $dispatcher |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function boot(Dispatcher $dispatcher) |
|
| 15 | + { |
|
| 16 | + $dispatcher->mapUsing(function($command) |
|
| 17 | + { |
|
| 18 | + return Dispatcher::simpleMapping( |
|
| 19 | + $command, 'BB\Commands', 'BB\Handlers\Commands' |
|
| 20 | + ); |
|
| 21 | + }); |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Register any application services. |
|
| 26 | - * |
|
| 27 | - * @return void |
|
| 28 | - */ |
|
| 29 | - public function register() |
|
| 30 | - { |
|
| 31 | - // |
|
| 32 | - } |
|
| 24 | + /** |
|
| 25 | + * Register any application services. |
|
| 26 | + * |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 29 | + public function register() |
|
| 30 | + { |
|
| 31 | + // |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | } |
@@ -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' |
@@ -3,7 +3,8 @@ discard block |
||
| 3 | 3 | use Illuminate\Bus\Dispatcher; |
| 4 | 4 | use Illuminate\Support\ServiceProvider; |
| 5 | 5 | |
| 6 | -class BusServiceProvider extends ServiceProvider { |
|
| 6 | +class BusServiceProvider extends ServiceProvider |
|
| 7 | +{ |
|
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * Bootstrap any application services. |
@@ -13,8 +14,7 @@ discard block |
||
| 13 | 14 | */ |
| 14 | 15 | public function boot(Dispatcher $dispatcher) |
| 15 | 16 | { |
| 16 | - $dispatcher->mapUsing(function($command) |
|
| 17 | - { |
|
| 17 | + $dispatcher->mapUsing(function($command) { |
|
| 18 | 18 | return Dispatcher::simpleMapping( |
| 19 | 19 | $command, 'BB\Commands', 'BB\Handlers\Commands' |
| 20 | 20 | ); |
@@ -4,20 +4,20 @@ |
||
| 4 | 4 | |
| 5 | 5 | class ConfigServiceProvider extends ServiceProvider { |
| 6 | 6 | |
| 7 | - /** |
|
| 8 | - * Overwrite any vendor / package configuration. |
|
| 9 | - * |
|
| 10 | - * This service provider is intended to provide a convenient location for you |
|
| 11 | - * to overwrite any "vendor" or package configuration that you may want to |
|
| 12 | - * modify before the application handles the incoming request / command. |
|
| 13 | - * |
|
| 14 | - * @return void |
|
| 15 | - */ |
|
| 16 | - public function register() |
|
| 17 | - { |
|
| 18 | - config([ |
|
| 19 | - // |
|
| 20 | - ]); |
|
| 21 | - } |
|
| 7 | + /** |
|
| 8 | + * Overwrite any vendor / package configuration. |
|
| 9 | + * |
|
| 10 | + * This service provider is intended to provide a convenient location for you |
|
| 11 | + * to overwrite any "vendor" or package configuration that you may want to |
|
| 12 | + * modify before the application handles the incoming request / command. |
|
| 13 | + * |
|
| 14 | + * @return void |
|
| 15 | + */ |
|
| 16 | + public function register() |
|
| 17 | + { |
|
| 18 | + config([ |
|
| 19 | + // |
|
| 20 | + ]); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | 23 | } |
@@ -2,7 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Support\ServiceProvider; |
| 4 | 4 | |
| 5 | -class ConfigServiceProvider extends ServiceProvider { |
|
| 5 | +class ConfigServiceProvider extends ServiceProvider |
|
| 6 | +{ |
|
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * Overwrite any vendor / package configuration. |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; |
| 19 | 19 | use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
| 20 | 20 | |
| 21 | -class EventServiceProvider extends ServiceProvider { |
|
| 21 | +class EventServiceProvider extends ServiceProvider |
|
| 22 | +{ |
|
| 22 | 23 | |
| 23 | 24 | /** |
| 24 | 25 | * The event handler mappings for the application. |
@@ -22,33 +22,33 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | class EventServiceProvider extends ServiceProvider { |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * The event handler mappings for the application. |
|
| 27 | - * |
|
| 28 | - * @var array |
|
| 29 | - */ |
|
| 30 | - protected $listen = [ |
|
| 31 | - 'payment.create' => [ |
|
| 32 | - 'BB\Handlers\PaymentEventHandler@onCreate', |
|
| 33 | - ], |
|
| 25 | + /** |
|
| 26 | + * The event handler mappings for the application. |
|
| 27 | + * |
|
| 28 | + * @var array |
|
| 29 | + */ |
|
| 30 | + protected $listen = [ |
|
| 31 | + 'payment.create' => [ |
|
| 32 | + 'BB\Handlers\PaymentEventHandler@onCreate', |
|
| 33 | + ], |
|
| 34 | 34 | 'payment.delete' => [ |
| 35 | - 'BB\Handlers\PaymentEventHandler@onDelete', |
|
| 36 | - ], |
|
| 35 | + 'BB\Handlers\PaymentEventHandler@onDelete', |
|
| 36 | + ], |
|
| 37 | 37 | 'payment.cancelled' => [ |
| 38 | - 'BB\Handlers\PaymentEventHandler@onCancel', |
|
| 39 | - ], |
|
| 38 | + 'BB\Handlers\PaymentEventHandler@onCancel', |
|
| 39 | + ], |
|
| 40 | 40 | 'payment.paid' => [ |
| 41 | - 'BB\Handlers\PaymentEventHandler@onPaid', |
|
| 42 | - ], |
|
| 41 | + 'BB\Handlers\PaymentEventHandler@onPaid', |
|
| 42 | + ], |
|
| 43 | 43 | 'BB\Events\SubscriptionChargePaid' => [ |
| 44 | 44 | ExtendMembership::class |
| 45 | 45 | ], |
| 46 | 46 | 'sub-charge.processing' => [ |
| 47 | - 'BB\Handlers\SubChargeEventHandler@onProcessing', |
|
| 48 | - ], |
|
| 47 | + 'BB\Handlers\SubChargeEventHandler@onProcessing', |
|
| 48 | + ], |
|
| 49 | 49 | 'sub-charge.payment-failed' => [ |
| 50 | - 'BB\Handlers\SubChargeEventHandler@onPaymentFailure', |
|
| 51 | - ], |
|
| 50 | + 'BB\Handlers\SubChargeEventHandler@onPaymentFailure', |
|
| 51 | + ], |
|
| 52 | 52 | 'BB\Events\NewExpenseSubmitted' => [ |
| 53 | 53 | EmailTrusteesAboutExpense::class, |
| 54 | 54 | ], |
@@ -78,25 +78,25 @@ discard block |
||
| 78 | 78 | MemberBalanceChanged::class => [ |
| 79 | 79 | RecalculateMemberBalance::class |
| 80 | 80 | ], |
| 81 | - SubscriptionPayment\FailedInsufficientFunds::class => [ |
|
| 82 | - EmailMemberAboutFailedSubscriptionPayment::class |
|
| 83 | - ], |
|
| 84 | - SubscriptionPayment\InsufficientFundsTryingDirectDebit::class => [ |
|
| 85 | - EmailMemberAboutFailedSubscriptionPaymentGoingToBackup::class |
|
| 86 | - ], |
|
| 87 | - ]; |
|
| 81 | + SubscriptionPayment\FailedInsufficientFunds::class => [ |
|
| 82 | + EmailMemberAboutFailedSubscriptionPayment::class |
|
| 83 | + ], |
|
| 84 | + SubscriptionPayment\InsufficientFundsTryingDirectDebit::class => [ |
|
| 85 | + EmailMemberAboutFailedSubscriptionPaymentGoingToBackup::class |
|
| 86 | + ], |
|
| 87 | + ]; |
|
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * Register any other events for your application. |
|
| 91 | - * |
|
| 92 | - * @param \Illuminate\Contracts\Events\Dispatcher $events |
|
| 93 | - * @return void |
|
| 94 | - */ |
|
| 95 | - public function boot(DispatcherContract $events) |
|
| 96 | - { |
|
| 97 | - parent::boot($events); |
|
| 89 | + /** |
|
| 90 | + * Register any other events for your application. |
|
| 91 | + * |
|
| 92 | + * @param \Illuminate\Contracts\Events\Dispatcher $events |
|
| 93 | + * @return void |
|
| 94 | + */ |
|
| 95 | + public function boot(DispatcherContract $events) |
|
| 96 | + { |
|
| 97 | + parent::boot($events); |
|
| 98 | 98 | |
| 99 | - // |
|
| 100 | - } |
|
| 99 | + // |
|
| 100 | + } |
|
| 101 | 101 | |
| 102 | 102 | } |
@@ -5,40 +5,40 @@ |
||
| 5 | 5 | |
| 6 | 6 | class RouteServiceProvider extends ServiceProvider { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * This namespace is applied to the controller routes in your routes file. |
|
| 10 | - * |
|
| 11 | - * In addition, it is set as the URL generator's root namespace. |
|
| 12 | - * |
|
| 13 | - * @var string |
|
| 14 | - */ |
|
| 15 | - protected $namespace = 'BB\Http\Controllers'; |
|
| 8 | + /** |
|
| 9 | + * This namespace is applied to the controller routes in your routes file. |
|
| 10 | + * |
|
| 11 | + * In addition, it is set as the URL generator's root namespace. |
|
| 12 | + * |
|
| 13 | + * @var string |
|
| 14 | + */ |
|
| 15 | + protected $namespace = 'BB\Http\Controllers'; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * Define your route model bindings, pattern filters, etc. |
|
| 19 | - * |
|
| 20 | - * @param \Illuminate\Routing\Router $router |
|
| 21 | - * @return void |
|
| 22 | - */ |
|
| 23 | - public function boot(Router $router) |
|
| 24 | - { |
|
| 25 | - // |
|
| 17 | + /** |
|
| 18 | + * Define your route model bindings, pattern filters, etc. |
|
| 19 | + * |
|
| 20 | + * @param \Illuminate\Routing\Router $router |
|
| 21 | + * @return void |
|
| 22 | + */ |
|
| 23 | + public function boot(Router $router) |
|
| 24 | + { |
|
| 25 | + // |
|
| 26 | 26 | |
| 27 | - parent::boot($router); |
|
| 28 | - } |
|
| 27 | + parent::boot($router); |
|
| 28 | + } |
|
| 29 | 29 | |
| 30 | - /** |
|
| 31 | - * Define the routes for the application. |
|
| 32 | - * |
|
| 33 | - * @param \Illuminate\Routing\Router $router |
|
| 34 | - * @return void |
|
| 35 | - */ |
|
| 36 | - public function map(Router $router) |
|
| 37 | - { |
|
| 38 | - $router->group(['namespace' => $this->namespace], function($router) |
|
| 39 | - { |
|
| 40 | - require app_path('Http/routes.php'); |
|
| 41 | - }); |
|
| 42 | - } |
|
| 30 | + /** |
|
| 31 | + * Define the routes for the application. |
|
| 32 | + * |
|
| 33 | + * @param \Illuminate\Routing\Router $router |
|
| 34 | + * @return void |
|
| 35 | + */ |
|
| 36 | + public function map(Router $router) |
|
| 37 | + { |
|
| 38 | + $router->group(['namespace' => $this->namespace], function($router) |
|
| 39 | + { |
|
| 40 | + require app_path('Http/routes.php'); |
|
| 41 | + }); |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | 44 | } |
@@ -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 | }); |
@@ -3,7 +3,8 @@ discard block |
||
| 3 | 3 | use Illuminate\Routing\Router; |
| 4 | 4 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
| 5 | 5 | |
| 6 | -class RouteServiceProvider extends ServiceProvider { |
|
| 6 | +class RouteServiceProvider extends ServiceProvider |
|
| 7 | +{ |
|
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * This namespace is applied to the controller routes in your routes file. |
@@ -35,8 +36,7 @@ discard block |
||
| 35 | 36 | */ |
| 36 | 37 | public function map(Router $router) |
| 37 | 38 | { |
| 38 | - $router->group(['namespace' => $this->namespace], function($router) |
|
| 39 | - { |
|
| 39 | + $router->group(['namespace' => $this->namespace], function($router) { |
|
| 40 | 40 | require app_path('Http/routes.php'); |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -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(); |