@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public function boot() |
| 28 | 28 | { |
| 29 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
| 29 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
| 30 | 30 | $this->publishes([$configPath => config_path('understand-laravel.php')], 'config'); |
| 31 | 31 | $enabled = $this->app['config']->get('understand-laravel.enabled'); |
| 32 | 32 | |
@@ -55,20 +55,20 @@ discard block |
||
| 55 | 55 | // L5.0 does not support custom directives |
| 56 | 56 | if ($this->detectLaravelVersion(['5.0'])) |
| 57 | 57 | { |
| 58 | - Blade::extend(function ($view, $compiler) use ($configuration) |
|
| 58 | + Blade::extend(function($view, $compiler) use ($configuration) |
|
| 59 | 59 | { |
| 60 | 60 | $pattern = $compiler->createMatcher('understandJsConfig'); |
| 61 | 61 | |
| 62 | 62 | return preg_replace($pattern, json_encode($configuration), $view); |
| 63 | 63 | }); |
| 64 | 64 | |
| 65 | - Blade::extend(function ($view, $compiler) use ($configuration) |
|
| 65 | + Blade::extend(function($view, $compiler) use ($configuration) |
|
| 66 | 66 | { |
| 67 | 67 | $pattern = $compiler->createMatcher('understandJs'); |
| 68 | 68 | |
| 69 | - $out = "<script src=\"" . UnderstandJsProvider::getJsBundleUrl() . "\"></script>\r\n"; |
|
| 69 | + $out = "<script src=\"".UnderstandJsProvider::getJsBundleUrl()."\"></script>\r\n"; |
|
| 70 | 70 | $out .= "<script>\r\n"; |
| 71 | - $out .= "Understand.init(" . json_encode($configuration) . ");\r\n"; |
|
| 71 | + $out .= "Understand.init(".json_encode($configuration).");\r\n"; |
|
| 72 | 72 | $out .= "Understand.installErrorHandlers();\r\n"; |
| 73 | 73 | $out .= "</script>"; |
| 74 | 74 | |
@@ -77,16 +77,16 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | else |
| 79 | 79 | { |
| 80 | - Blade::directive('understandJsConfig', function () use ($configuration) |
|
| 80 | + Blade::directive('understandJsConfig', function() use ($configuration) |
|
| 81 | 81 | { |
| 82 | 82 | return json_encode($configuration); |
| 83 | 83 | }); |
| 84 | 84 | |
| 85 | - Blade::directive('understandJs', function () use ($configuration) |
|
| 85 | + Blade::directive('understandJs', function() use ($configuration) |
|
| 86 | 86 | { |
| 87 | - $out = "<script src=\"" . UnderstandJsProvider::getJsBundleUrl() . "\"></script>\r\n"; |
|
| 87 | + $out = "<script src=\"".UnderstandJsProvider::getJsBundleUrl()."\"></script>\r\n"; |
|
| 88 | 88 | $out .= "<script>\r\n"; |
| 89 | - $out .= "Understand.init(" . json_encode($configuration) . ");\r\n"; |
|
| 89 | + $out .= "Understand.init(".json_encode($configuration).");\r\n"; |
|
| 90 | 90 | $out .= "Understand.installErrorHandlers();\r\n"; |
| 91 | 91 | $out .= "</script>"; |
| 92 | 92 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | protected function registerConfig() |
| 121 | 121 | { |
| 122 | - $configPath = __DIR__ . '/../../config/understand-laravel.php'; |
|
| 122 | + $configPath = __DIR__.'/../../config/understand-laravel.php'; |
|
| 123 | 123 | $this->mergeConfigFrom($configPath, 'understand-laravel'); |
| 124 | 124 | } |
| 125 | 125 | |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | return new Handlers\SyncHandler($inputToken, $apiUrl, $sslBundlePath); |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - throw new \ErrorException('understand-laravel handler misconfiguration:' . $handlerType); |
|
| 288 | + throw new \ErrorException('understand-laravel handler misconfiguration:'.$handlerType); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
@@ -404,13 +404,13 @@ discard block |
||
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | // `\Log::info`, `\Log::debug` and NOT `\Exception` or `\Throwable` |
| 407 | - if (in_array($level, ['info', 'debug']) && ! ($message instanceof Exception || $message instanceof Throwable)) |
|
| 407 | + if (in_array($level, ['info', 'debug']) && !($message instanceof Exception || $message instanceof Throwable)) |
|
| 408 | 408 | { |
| 409 | 409 | $this->app['understand.eventLogger']->logEvent($level, $message, $context); |
| 410 | 410 | } |
| 411 | 411 | // `\Log::notice`, `\Log::warning`, `\Log::error`, `\Log::critical`, `\Log::alert`, `\Log::emergency` and `\Exception`, `\Throwable` |
| 412 | 412 | // '5.5', '5.6', '5.7', '5.8' |
| 413 | - 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)) |
|
| 413 | + 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)) |
|
| 414 | 414 | { |
| 415 | 415 | $exception = $context['exception']; |
| 416 | 416 | unset($context['exception']); |
@@ -431,9 +431,9 @@ discard block |
||
| 431 | 431 | */ |
| 432 | 432 | protected function shouldIgnoreEvent($level, $message, $context) |
| 433 | 433 | { |
| 434 | - $ignoredEventTypes = (array)$this->app['config']->get('understand-laravel.ignored_logs'); |
|
| 434 | + $ignoredEventTypes = (array) $this->app['config']->get('understand-laravel.ignored_logs'); |
|
| 435 | 435 | |
| 436 | - if ( ! $ignoredEventTypes) |
|
| 436 | + if (!$ignoredEventTypes) |
|
| 437 | 437 | { |
| 438 | 438 | return false; |
| 439 | 439 | } |