@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up(): void |
| 15 | 15 | { |
| 16 | - Schema::create('webhook_subscribers', function (Blueprint $table) { |
|
| 16 | + Schema::create('webhook_subscribers', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('event', 100)->index(); |
| 19 | 19 | $table->string('url'); |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $query->where('enabled', '=', true); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - $result = $query->get()->map(function ($object) { |
|
| 65 | + $result = $query->get()->map(function($object) { |
|
| 66 | 66 | return $this->createSubscriber($object); |
| 67 | 67 | }); |
| 68 | 68 | |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public function getUrls(): self |
| 18 | 18 | { |
| 19 | - return $this->map(function (Subscriber $subscriber) { |
|
| 19 | + return $this->map(function(Subscriber $subscriber) { |
|
| 20 | 20 | return $subscriber->url(); |
| 21 | 21 | }); |
| 22 | 22 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function filterByEvent(string $eventName): self |
| 30 | 30 | { |
| 31 | - return $this->filter(function (Subscriber $subscriber) use ($eventName) { |
|
| 31 | + return $this->filter(function(Subscriber $subscriber) use ($eventName) { |
|
| 32 | 32 | return $subscriber->event() === $eventName; |
| 33 | 33 | }); |
| 34 | 34 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function filterEnabled(): self |
| 40 | 40 | { |
| 41 | - return $this->filter(function (Subscriber $subscriber) { |
|
| 41 | + return $this->filter(function(Subscriber $subscriber) { |
|
| 42 | 42 | return $subscriber->isEnabled(); |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -40,6 +40,6 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | protected function defaultHeaders(): array |
| 42 | 42 | { |
| 43 | - return ['Content-type' => 'application/json']; |
|
| 43 | + return [ 'Content-type' => 'application/json' ]; |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | public function register(): void |
| 20 | 20 | { |
| 21 | - $this->app->bind(SubscriberRepository::class, function (Container $container) { |
|
| 21 | + $this->app->bind(SubscriberRepository::class, function(Container $container) { |
|
| 22 | 22 | return new DatabaseSubscriberRepository( |
| 23 | 23 | $container->get(Connection::class), |
| 24 | 24 | $container->get(ValidationFactory::class), |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | ); |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | - $this->app->bind(Channel::class, function () { |
|
| 29 | + $this->app->bind(Channel::class, function() { |
|
| 30 | 30 | return new WebhookChannel(new Client()); |
| 31 | 31 | }); |
| 32 | 32 | |
| 33 | - $this->app->bind(MessageProcessorContract::class, function (Container $container) { |
|
| 33 | + $this->app->bind(MessageProcessorContract::class, function(Container $container) { |
|
| 34 | 34 | return new MessageProcessor( |
| 35 | 35 | $container->get(SubscriberRepository::class), |
| 36 | 36 | $container->get(BusDispatcher::class), |