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