@@ -89,8 +89,8 @@ discard block |
||
89 | 89 | */ |
90 | 90 | public function registerEventDispatcher() |
91 | 91 | { |
92 | - $this->app->singleton('events', function ($app) { |
|
93 | - return (new EventDispatcher($app))->setQueueResolver(function () use ($app) { |
|
92 | + $this->app->singleton('events', function($app) { |
|
93 | + return (new EventDispatcher($app))->setQueueResolver(function() use ($app) { |
|
94 | 94 | return $app->make(QueueFactoryContract::class); |
95 | 95 | }); |
96 | 96 | }); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | public function setWebhooks($webhooks) |
167 | 167 | { |
168 | 168 | $this->webhooks = $webhooks; |
169 | - $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () { |
|
169 | + $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() { |
|
170 | 170 | return $this->webhooks; |
171 | 171 | }); |
172 | 172 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | { |
179 | 179 | // Check if migration ran |
180 | 180 | if (Schema::hasTable((new Webhook)->getTable())) { |
181 | - return collect($this->getCache()->rememberForever(Webhook::CACHE_KEY, function () { |
|
181 | + return collect($this->getCache()->rememberForever(Webhook::CACHE_KEY, function() { |
|
182 | 182 | return Webhook::all(); |
183 | 183 | })); |
184 | 184 | } |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $webhooks = $this->getWebhooks()->where('event', $eventName); |
230 | 230 | $webhooks = $webhooks->filter($this->config->get('captain_hook.filter', null)); |
231 | 231 | |
232 | - if (! $webhooks->isEmpty()) { |
|
232 | + if (!$webhooks->isEmpty()) { |
|
233 | 233 | $this->dispatch(new TriggerWebhooksJob($webhooks, $eventData)); |
234 | 234 | } |
235 | 235 | } |
@@ -7,17 +7,17 @@ |
||
7 | 7 | class EventDispatcher extends Dispatcher |
8 | 8 | { |
9 | 9 | /** |
10 | - * The event firing stack. |
|
11 | - * |
|
12 | - * @var array |
|
13 | - */ |
|
10 | + * The event firing stack. |
|
11 | + * |
|
12 | + * @var array |
|
13 | + */ |
|
14 | 14 | protected $firing = []; |
15 | 15 | |
16 | 16 | /** |
17 | - * Get the event that is currently firing. |
|
18 | - * |
|
19 | - * @return string |
|
20 | - */ |
|
17 | + * Get the event that is currently firing. |
|
18 | + * |
|
19 | + * @return string |
|
20 | + */ |
|
21 | 21 | public function firing() |
22 | 22 | { |
23 | 23 | return last($this->firing); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | // If a response is returned from the listener and event halting is enabled |
55 | 55 | // we will just return this response, and not call the rest of the event |
56 | 56 | // listeners. Otherwise we will add the response on the response list. |
57 | - if (! is_null($response) && $halt) { |
|
57 | + if (!is_null($response) && $halt) { |
|
58 | 58 | array_pop($this->firing); |
59 | 59 | |
60 | 60 | return $response; |