Completed
Push — master ( 4169f6...02448e )
by Marcel
02:38 queued 19s
created
src/Mpociot/CaptainHook/CaptainHookServiceProvider.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
     protected function publishMigration()
80 80
     {
81 81
         $migrations = [
82
-            __DIR__.'/../../database/2015_10_29_000000_captain_hook_setup_table.php' => database_path('/migrations/'.date('Y_m_d_His').'_captain_hook_setup_table.php'),
83
-            __DIR__.'/../../database/2015_10_29_000001_captain_hook_setup_logs_table.php' => database_path('/migrations/'.date('Y_m_d_His', strtotime('+1s')).'_captain_hook_setup_logs_table.php'),
82
+            __DIR__ . '/../../database/2015_10_29_000000_captain_hook_setup_table.php' => database_path('/migrations/' . date('Y_m_d_His') . '_captain_hook_setup_table.php'),
83
+            __DIR__ . '/../../database/2015_10_29_000001_captain_hook_setup_logs_table.php' => database_path('/migrations/' . date('Y_m_d_His', strtotime('+1s')) . '_captain_hook_setup_logs_table.php'),
84 84
         ];
85 85
 
86 86
         foreach ($migrations as $migration => $toPath) {
87 87
             preg_match('/_captain_hook_.*\.php/', $migration, $match);
88
-            $published_migration = glob(database_path('/migrations/*'.$match[0]));
88
+            $published_migration = glob(database_path('/migrations/*' . $match[0]));
89 89
             if (count($published_migration) !== 0) {
90 90
                 unset($migrations[$migration]);
91 91
             }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     protected function publishConfig()
101 101
     {
102 102
         $this->publishes([
103
-            __DIR__.'/../../config/config.php' => config_path('captain_hook.php'),
103
+            __DIR__ . '/../../config/config.php' => config_path('captain_hook.php'),
104 104
         ]);
105 105
     }
106 106
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     protected function registerEventListeners()
111 111
     {
112 112
         foreach ($this->listeners as $eventName) {
113
-            $this->app[ 'events' ]->listen($eventName, [$this, 'handleEvent']);
113
+            $this->app['events']->listen($eventName, [$this, 'handleEvent']);
114 114
         }
115 115
     }
116 116
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function setWebhooks($webhooks)
131 131
     {
132 132
         $this->webhooks = $webhooks;
133
-        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
133
+        $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
134 134
             return $this->webhooks;
135 135
         });
136 136
     }
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function getWebhooks()
142 142
     {
143
-        if (! $this->getCache()->has(Webhook::CACHE_KEY)) {
144
-            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function () {
143
+        if (!$this->getCache()->has(Webhook::CACHE_KEY)) {
144
+            $this->getCache()->rememberForever(Webhook::CACHE_KEY, function() {
145 145
                 return Webhook::all();
146 146
             });
147 147
         }
@@ -201,15 +201,15 @@  discard block
 block discarded – undo
201 201
      */
202 202
     protected function registerCommands()
203 203
     {
204
-        $this->app[ 'hook.list' ] = $this->app->share(function () {
204
+        $this->app['hook.list'] = $this->app->share(function() {
205 205
             return new ListWebhooks();
206 206
         });
207 207
 
208
-        $this->app[ 'hook.add' ] = $this->app->share(function () {
208
+        $this->app['hook.add'] = $this->app->share(function() {
209 209
             return new AddWebhook();
210 210
         });
211 211
 
212
-        $this->app[ 'hook.delete' ] = $this->app->share(function () {
212
+        $this->app['hook.delete'] = $this->app->share(function() {
213 213
             return new DeleteWebhook();
214 214
         });
215 215
 
Please login to merge, or discard this patch.