@@ -52,17 +52,17 @@ discard block |
||
| 52 | 52 | $this->registerReporters(); |
| 53 | 53 | $this->registerCheckinsSync(); |
| 54 | 54 | |
| 55 | - $this->app->bind(LogHandler::class, function ($app) { |
|
| 55 | + $this->app->bind(LogHandler::class, function($app) { |
|
| 56 | 56 | return new LogHandler($app[Reporter::class]); |
| 57 | 57 | }); |
| 58 | 58 | |
| 59 | - $this->app->singleton('honeybadger.isLumen', function () { |
|
| 59 | + $this->app->singleton('honeybadger.isLumen', function() { |
|
| 60 | 60 | return preg_match('/lumen/i', $this->app->version()); |
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | 63 | $this->app->when(HoneybadgerDeployCommand::class) |
| 64 | 64 | ->needs(Client::class) |
| 65 | - ->give(function () { |
|
| 65 | + ->give(function() { |
|
| 66 | 66 | return new Client([ |
| 67 | 67 | 'http_errors' => false, |
| 68 | 68 | ]); |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | private function registerEventHooks() |
| 121 | 121 | { |
| 122 | 122 | /** @param string|array|null $environments */ |
| 123 | - Event::macro('thenPingHoneybadger', function (string $checkinIdOrName, $environments = null) { |
|
| 124 | - return $this->then(function () use ($checkinIdOrName, $environments) { |
|
| 123 | + Event::macro('thenPingHoneybadger', function(string $checkinIdOrName, $environments = null) { |
|
| 124 | + return $this->then(function() use ($checkinIdOrName, $environments) { |
|
| 125 | 125 | if ($environments === null || app()->environment($environments)) { |
| 126 | 126 | app(Reporter::class)->checkin($checkinIdOrName); |
| 127 | 127 | } |
@@ -129,8 +129,8 @@ discard block |
||
| 129 | 129 | }); |
| 130 | 130 | |
| 131 | 131 | /** @param string|array|null $environments */ |
| 132 | - Event::macro('pingHoneybadgerOnSuccess', function (string $checkinIdOrName, $environments = null) { |
|
| 133 | - return $this->onSuccess(function () use ($checkinIdOrName, $environments) { |
|
| 132 | + Event::macro('pingHoneybadgerOnSuccess', function(string $checkinIdOrName, $environments = null) { |
|
| 133 | + return $this->onSuccess(function() use ($checkinIdOrName, $environments) { |
|
| 134 | 134 | if ($environments === null || app()->environment($environments)) { |
| 135 | 135 | app(Reporter::class)->checkin($checkinIdOrName); |
| 136 | 136 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | // Views are not enabled on Lumen by default |
| 144 | 144 | if (app()->bound('blade.compiler')) { |
| 145 | - Blade::directive('honeybadgerError', function ($options) { |
|
| 145 | + Blade::directive('honeybadgerError', function($options) { |
|
| 146 | 146 | if ($options === '') { |
| 147 | 147 | $options = '[]'; |
| 148 | 148 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | return "<?php echo \$__env->make('honeybadger::informer', $options, $defaults)->render(); ?>"; |
| 153 | 153 | }); |
| 154 | 154 | |
| 155 | - Blade::directive('honeybadgerFeedback', function () { |
|
| 155 | + Blade::directive('honeybadgerFeedback', function() { |
|
| 156 | 156 | $action = rtrim(Honeybadger::API_URL, '/').'/v1/feedback'; |
| 157 | 157 | |
| 158 | 158 | return "<?php echo \$__env->make('honeybadger::feedback', ['action' => '$action'])->render(); ?>"; |
@@ -187,14 +187,14 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | protected function registerCheckinsSync(): void |
| 189 | 189 | { |
| 190 | - $this->app->singleton(SyncCheckins::class, function ($app) { |
|
| 190 | + $this->app->singleton(SyncCheckins::class, function($app) { |
|
| 191 | 191 | return new CheckinsManager($app['config']['honeybadger']); |
| 192 | 192 | }); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | protected function registerReporters(): void |
| 196 | 196 | { |
| 197 | - $this->app->singleton(Reporter::class, function ($app) { |
|
| 197 | + $this->app->singleton(Reporter::class, function($app) { |
|
| 198 | 198 | return HoneybadgerLaravel::make($app['config']['honeybadger']); |
| 199 | 199 | }); |
| 200 | 200 | |
@@ -204,9 +204,9 @@ discard block |
||
| 204 | 204 | // In some cases (like the test command), we definitely want to throw any errors |
| 205 | 205 | // Laravel's contextual binding doesn't support method injection, |
| 206 | 206 | // so the handle() method will have to request this client specifically. |
| 207 | - $this->app->singleton('honeybadger.loud', function ($app) { |
|
| 207 | + $this->app->singleton('honeybadger.loud', function($app) { |
|
| 208 | 208 | $config = $app['config']['honeybadger']; |
| 209 | - $config['service_exception_handler'] = function (ServiceException $e) { |
|
| 209 | + $config['service_exception_handler'] = function(ServiceException $e) { |
|
| 210 | 210 | throw $e; |
| 211 | 211 | }; |
| 212 | 212 | |