@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | protected function registerConfig() |
| 13 | 13 | { |
| 14 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
| 14 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
| 15 | 15 | $this->mergeConfigFrom($configPath, 'understand-laravel'); |
| 16 | 16 | } |
| 17 | 17 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | protected function registerTokenProvider() |
| 24 | 24 | { |
| 25 | - $this->app->singleton('understand.tokenProvider', function () |
|
| 25 | + $this->app->singleton('understand.tokenProvider', function() |
|
| 26 | 26 | { |
| 27 | 27 | return new TokenProvider(); |
| 28 | 28 | }); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | protected function registerDataCollector() |
| 37 | 37 | { |
| 38 | - $this->app->singleton('understand.dataCollector', function () |
|
| 38 | + $this->app->singleton('understand.dataCollector', function() |
|
| 39 | 39 | { |
| 40 | 40 | return new DataCollector(); |
| 41 | 41 | }); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | protected function registerExceptionEncoder() |
| 50 | 50 | { |
| 51 | - $this->app->bind('understand.exceptionEncoder', function () |
|
| 51 | + $this->app->bind('understand.exceptionEncoder', function() |
|
| 52 | 52 | { |
| 53 | 53 | return new ExceptionEncoder; |
| 54 | 54 | }); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | return new Handlers\SyncHandler($inputToken, $apiUrl, $sslBundlePath); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - throw new \ErrorException('understand-laravel handler misconfiguration:' . $handlerType); |
|
| 116 | + throw new \ErrorException('understand-laravel handler misconfiguration:'.$handlerType); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function shouldIgnoreEvent($level, $message, $context) |
| 126 | 126 | { |
| 127 | - $ignoredEventTypes = (array)$this->app['config']->get('understand-laravel.ignored_logs'); |
|
| 127 | + $ignoredEventTypes = (array) $this->app['config']->get('understand-laravel.ignored_logs'); |
|
| 128 | 128 | |
| 129 | 129 | if (!$ignoredEventTypes) { |
| 130 | 130 | return false; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function boot() |
| 25 | 25 | { |
| 26 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
| 26 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
| 27 | 27 | $this->publishes([$configPath => config_path('understand-laravel.php')], 'config'); |
| 28 | 28 | $enabled = $this->app['config']->get('understand-laravel.enabled'); |
| 29 | 29 | |
@@ -235,13 +235,13 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // `\Log::info`, `\Log::debug` and NOT `\Exception` or `\Throwable` |
| 238 | - if (in_array($level, ['info', 'debug']) && ! ($message instanceof Exception || $message instanceof Throwable)) |
|
| 238 | + if (in_array($level, ['info', 'debug']) && !($message instanceof Exception || $message instanceof Throwable)) |
|
| 239 | 239 | { |
| 240 | 240 | $this->app['understand.eventLogger']->logEvent($level, $message, $context); |
| 241 | 241 | } |
| 242 | 242 | // `\Log::notice`, `\Log::warning`, `\Log::error`, `\Log::critical`, `\Log::alert`, `\Log::emergency` and `\Exception`, `\Throwable` |
| 243 | 243 | // '5.5', '5.6', '5.7', '5.8' |
| 244 | - else if ( ! $this->detectLaravelVersion(['5.0', '5.1', '5.2', '5.3', '5.4']) && isset($context['exception']) && ($context['exception'] instanceof Exception || $context['exception'] instanceof Throwable)) |
|
| 244 | + else if (!$this->detectLaravelVersion(['5.0', '5.1', '5.2', '5.3', '5.4']) && isset($context['exception']) && ($context['exception'] instanceof Exception || $context['exception'] instanceof Throwable)) |
|
| 245 | 245 | { |
| 246 | 246 | $exception = $context['exception']; |
| 247 | 247 | unset($context['exception']); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | return $fieldProvider; |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - if (! class_exists('UnderstandFieldProvider')) |
|
| 83 | + if (!class_exists('UnderstandFieldProvider')) |
|
| 84 | 84 | { |
| 85 | 85 | class_alias('Understand\UnderstandLaravel5\Facades\UnderstandFieldProvider', 'UnderstandFieldProvider'); |
| 86 | 86 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | parent::registerEventLoggers(); |
| 97 | 97 | |
| 98 | - if (! class_exists('UnderstandExceptionLogger')) |
|
| 98 | + if (!class_exists('UnderstandExceptionLogger')) |
|
| 99 | 99 | { |
| 100 | 100 | class_alias('Understand\UnderstandLaravel5\Facades\UnderstandExceptionLogger', 'UnderstandExceptionLogger'); |
| 101 | 101 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | parent::registerLogger(); |
| 112 | 112 | |
| 113 | - if (! class_exists('UnderstandLogger')) |
|
| 113 | + if (!class_exists('UnderstandLogger')) |
|
| 114 | 114 | { |
| 115 | 115 | class_alias('Understand\UnderstandLaravel5\Facades\UnderstandLogger', 'UnderstandLogger'); |
| 116 | 116 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | // the illuminate.log event is raised |
| 159 | 159 | // by our MonologHandler, not by Lumen |
| 160 | - $this->app['events']->listen('illuminate.log', function ($log) |
|
| 160 | + $this->app['events']->listen('illuminate.log', function($log) |
|
| 161 | 161 | { |
| 162 | 162 | $this->handleEvent($log['level'], $log['message'], $log['context']); |
| 163 | 163 | }); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | else |
| 166 | 166 | { |
| 167 | 167 | // starting from Lumen 5.6 MessageLogged event class was introduced |
| 168 | - $this->app['events']->listen('Illuminate\Log\Events\MessageLogged', function ($log) |
|
| 168 | + $this->app['events']->listen('Illuminate\Log\Events\MessageLogged', function($log) |
|
| 169 | 169 | { |
| 170 | 170 | $this->handleEvent($log->level, $log->message, $log->context); |
| 171 | 171 | }); |
@@ -175,17 +175,17 @@ discard block |
||
| 175 | 175 | // https://github.com/illuminate/queue/commit/ce2b5518902b1bcb9ef650c41900fc8c6392eb0c |
| 176 | 176 | if ($this->app->runningInConsole()) { |
| 177 | 177 | if ($this->detectLumenVersion(['5.0', '5.1'])) { |
| 178 | - $this->app['events']->listen('illuminate.queue.after', function () { |
|
| 178 | + $this->app['events']->listen('illuminate.queue.after', function() { |
|
| 179 | 179 | $this->app['understand.tokenProvider']->generate(); |
| 180 | 180 | $this->app['understand.dataCollector']->reset(); |
| 181 | 181 | }); |
| 182 | 182 | |
| 183 | - $this->app['events']->listen('illuminate.queue.failed', function () { |
|
| 183 | + $this->app['events']->listen('illuminate.queue.failed', function() { |
|
| 184 | 184 | $this->app['understand.tokenProvider']->generate(); |
| 185 | 185 | $this->app['understand.dataCollector']->reset(); |
| 186 | 186 | }); |
| 187 | 187 | } else { |
| 188 | - $this->app['events']->listen('Illuminate\Queue\Events\JobProcessing', function () { |
|
| 188 | + $this->app['events']->listen('Illuminate\Queue\Events\JobProcessing', function() { |
|
| 189 | 189 | $this->app['understand.tokenProvider']->generate(); |
| 190 | 190 | $this->app['understand.dataCollector']->reset(); |
| 191 | 191 | }); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // `\Log::info`, `\Log::debug` and NOT `\Exception` or `\Throwable` |
| 245 | - if (in_array($level, ['info', 'debug']) && ! ($message instanceof Exception || $message instanceof Throwable)) |
|
| 245 | + if (in_array($level, ['info', 'debug']) && !($message instanceof Exception || $message instanceof Throwable)) |
|
| 246 | 246 | { |
| 247 | 247 | $this->app['understand.eventLogger']->logEvent($level, $message, $context); |
| 248 | 248 | } |