Completed
Push — master ( 9c04b9...73f018 )
by Marcel
06:33
created
src/Mpociot/CaptainHook/Http/WebhookController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      * Create a new webhook for the user.
40 40
      *
41 41
      * @param  CreateWebhookRequest  $request
42
-     * @return Response
42
+     * @return \Illuminate\Http\JsonResponse
43 43
      */
44 44
     public function store(CreateWebhookRequest $request)
45 45
     {
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/Http/WebhookEventsController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     /**
22 22
      * Get all of the available webhook events.
23 23
      *
24
-     * @return Response
24
+     * @return \Illuminate\Support\Collection
25 25
      */
26 26
     public function all(Request $request)
27 27
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function all(Request $request)
27 27
     {
28
-        return collect(config('captain_hook.listeners', []))->transform(function ($key, $value) {
28
+        return collect(config('captain_hook.listeners', []))->transform(function($key, $value) {
29 29
             return [
30 30
                 'name' => $value,
31 31
                 'event' => $key
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Route::group(['middleware' => 'web'], function ($router) {
3
+Route::group(['middleware' => 'web'], function($router) {
4 4
     $router->get('/settings/api/webhooks', 'Mpociot\CaptainHook\Http\WebhookController@all');
5 5
     $router->post('/settings/api/webhook', 'Mpociot\CaptainHook\Http\WebhookController@store');
6 6
     $router->put('/settings/api/webhook/{webhook_id}', 'Mpociot\CaptainHook\Http\WebhookController@update');
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/Webhook.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@  discard block
 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
-        static::updated(function ($results) {
38
+        static::updated(function($results) {
39 39
             Cache::forget(self::CACHE_KEY);
40 40
         });
41 41
 
42
-        static::deleted(function ($results) {
42
+        static::deleted(function($results) {
43 43
             Cache::forget(self::CACHE_KEY);
44 44
         });
45 45
     }
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function lastLog()
63 63
     {
64
-        return $this->hasOne(WebhookLog::class)->orderBy('created_at','DESC');
64
+        return $this->hasOne(WebhookLog::class)->orderBy('created_at', 'DESC');
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
src/Mpociot/CaptainHook/CaptainHookServiceProvider.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         $this->publishes([
114 114
             __DIR__.'/../../resources/assets/js/' => base_path('resources/assets/js/components/'),
115
-            __DIR__ . '/../../resources/views/' => base_path('resources/views/vendor/captainhook/settings/'),
115
+            __DIR__.'/../../resources/views/' => base_path('resources/views/vendor/captainhook/settings/'),
116 116
         ], 'spark-resources');
117 117
     }
118 118
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     protected function registerEventListeners()
123 123
     {
124 124
         foreach ($this->listeners as $eventName) {
125
-            $this->app[ 'events' ]->listen($eventName, [$this, 'handleEvent']);
125
+            $this->app['events']->listen($eventName, [$this, 'handleEvent']);
126 126
         }
127 127
     }
128 128
 
@@ -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
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
     protected function registerRoutes()
239 239
     {
240 240
         if (class_exists('Laravel\Spark\Providers\AppServiceProvider')) {
241
-            include __DIR__ . '/../../routes.php';
241
+            include __DIR__.'/../../routes.php';
242 242
         }
243 243
     }
244 244
 }
Please login to merge, or discard this patch.