Completed
Push — master ( 73f018...3e223a )
by Marcel
10:28 queued 08:12
created
src/Mpociot/CaptainHook/Webhook.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,16 +31,16 @@
 block discarded – undo
31 31
     {
32 32
         parent::boot();
33 33
 
34
-        static::created(function ($results) {
34
+        static::created(function($results) {
35 35
             Cache::forget(self::CACHE_KEY);
36 36
         });
37 37
 
38 38
 
39
-        static::updated(function ($results) {
39
+        static::updated(function($results) {
40 40
             Cache::forget(self::CACHE_KEY);
41 41
         });
42 42
 
43
-        static::deleted(function ($results) {
43
+        static::deleted(function($results) {
44 44
             Cache::forget(self::CACHE_KEY);
45 45
         });
46 46
     }
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/Jobs/TriggerWebhooksJob.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     private function resolveCallable($transformer, $defaultMethodName)
55 55
     {
56 56
         if (is_string($transformer)) {
57
-            return function () use ($transformer, $defaultMethodName) {
57
+            return function() use ($transformer, $defaultMethodName) {
58 58
                 list($class, $method) = Str::parseCallback($transformer, $defaultMethodName);
59 59
 
60 60
                 return call_user_func_array([app($class), $method], func_get_args());
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             return $transformer;
64 64
         }
65 65
 
66
-        return function () {};
66
+        return function() {};
67 67
     }
68 68
 
69 69
     /**
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
                     'webhook_id' => $webhook['id'],
91 91
                     'url' => $webhook['url'],
92 92
                 ]);
93
-                $middleware = Middleware::tap(function (RequestInterface $request, $options) use ($log) {
93
+                $middleware = Middleware::tap(function(RequestInterface $request, $options) use ($log) {
94 94
                     $log->payload_format = isset($request->getHeader('Content-Type')[0]) ? $request->getHeader('Content-Type')[0] : null;
95 95
                     $log->payload = $request->getBody()->getContents();
96
-                }, function ($request, $options, PromiseInterface $response) use ($log, $webhook, $responseCallback) {
97
-                    $response->then(function (ResponseInterface $response) use ($log, $webhook, $responseCallback) {
96
+                }, function($request, $options, PromiseInterface $response) use ($log, $webhook, $responseCallback) {
97
+                    $response->then(function(ResponseInterface $response) use ($log, $webhook, $responseCallback) {
98 98
                         $log->status = $response->getStatusCode();
99 99
                         $log->response = $response->getBody()->getContents();
100 100
                         $log->response_format = $log->payload_format = isset($response->getHeader('Content-Type')[0]) ? $response->getHeader('Content-Type')[0] : null;
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/CaptainHookServiceProvider.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function setWebhooks($webhooks)
143 143
     {
144 144
         $this->webhooks = $webhooks;
145
-        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
145
+        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
146 146
             return $this->webhooks;
147 147
         });
148 148
     }
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getWebhooks()
154 154
     {
155
-        if (! $this->getCache()->has(Webhook::CACHE_KEY)) {
156
-            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
155
+        if (!$this->getCache()->has(Webhook::CACHE_KEY)) {
156
+            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
157 157
                 return Webhook::all();
158 158
             });
159 159
         }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         $webhooks = $this->getWebhooks()->where('event', $eventName);
205 205
         $webhooks = $webhooks->filter($this->config->get('captain_hook.filter', null));
206 206
 
207
-        if (! $webhooks->isEmpty()) {
207
+        if (!$webhooks->isEmpty()) {
208 208
             $this->dispatch(new TriggerWebhooksJob($webhooks, $eventData));
209 209
         }
210 210
     }
@@ -214,15 +214,15 @@  discard block
 block discarded – undo
214 214
      */
215 215
     protected function registerCommands()
216 216
     {
217
-        $this->app['hook.list'] = $this->app->share(function () {
217
+        $this->app['hook.list'] = $this->app->share(function() {
218 218
             return new ListWebhooks();
219 219
         });
220 220
 
221
-        $this->app['hook.add'] = $this->app->share(function () {
221
+        $this->app['hook.add'] = $this->app->share(function() {
222 222
             return new AddWebhook();
223 223
         });
224 224
 
225
-        $this->app['hook.delete'] = $this->app->share(function () {
225
+        $this->app['hook.delete'] = $this->app->share(function() {
226 226
             return new DeleteWebhook();
227 227
         });
228 228
 
Please login to merge, or discard this patch.