Completed
Pull Request — master (#43)
by Evgeny
11:21
created
src/Mpociot/CaptainHook/CaptainHookServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/EventDispatcher.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.