Completed
Push — master ( 422383...8131b6 )
by Marcel
60:43
created
src/Mpociot/CaptainHook/CaptainHookServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     protected function publishConfig()
88 88
     {
89 89
         $this->publishes([
90
-            __DIR__.'/../../config/config.php' => config_path('captain_hook.php'),
90
+            __DIR__ . '/../../config/config.php' => config_path('captain_hook.php'),
91 91
         ]);
92 92
     }
93 93
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     protected function registerEventListeners()
98 98
     {
99 99
         foreach ($this->listeners as $eventName) {
100
-            $this->app[ 'events' ]->listen($eventName, [$this, 'handleEvent']);
100
+            $this->app['events']->listen($eventName, [$this, 'handleEvent']);
101 101
         }
102 102
     }
103 103
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function setWebhooks($webhooks)
118 118
     {
119 119
         $this->webhooks = $webhooks;
120
-        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
120
+        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
121 121
             return $this->webhooks;
122 122
         });
123 123
     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function getWebhooks()
129 129
     {
130 130
         if (!$this->getCache()->has(Webhook::CACHE_KEY)) {
131
-            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
131
+            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
132 132
                 return Webhook::all();
133 133
             });
134 134
         }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     private function callWebhooks($webhooks, $eventData)
191 191
     {
192 192
         foreach ($webhooks as $webhook) {
193
-            $this->client->postAsync($webhook[ 'url' ], [
193
+            $this->client->postAsync($webhook['url'], [
194 194
                 'body' => json_encode($this->createRequestBody($eventData)),
195 195
                 'verify' => false,
196 196
                 'future' => true
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
      */
217 217
     protected function registerCommands()
218 218
     {
219
-        $this->app[ 'hook.list' ] = $this->app->share(function () {
219
+        $this->app['hook.list'] = $this->app->share(function() {
220 220
             return new ListWebhooks();
221 221
         });
222 222
 
223
-        $this->app[ 'hook.add' ] = $this->app->share(function () {
223
+        $this->app['hook.add'] = $this->app->share(function() {
224 224
             return new AddWebhook();
225 225
         });
226 226
 
227
-        $this->app[ 'hook.delete' ] = $this->app->share(function () {
227
+        $this->app['hook.delete'] = $this->app->share(function() {
228 228
             return new DeleteWebhook();
229 229
         });
230 230
 
Please login to merge, or discard this patch.