@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | /** |
| 68 | 68 | * Bootstrap the application events. |
| 69 | 69 | * |
| 70 | - * @return void |
|
| 70 | + * @return false|null |
|
| 71 | 71 | */ |
| 72 | 72 | public function boot() |
| 73 | 73 | { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * Check if the service provider is full booted. |
| 93 | 93 | * |
| 94 | - * @return void |
|
| 94 | + * @return boolean |
|
| 95 | 95 | */ |
| 96 | 96 | public function isFullyBooted() |
| 97 | 97 | { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | */ |
| 155 | 155 | protected function registerTracker() |
| 156 | 156 | { |
| 157 | - $this->app->singleton('tracker', function ($app) { |
|
| 157 | + $this->app->singleton('tracker', function($app) { |
|
| 158 | 158 | $app['tracker.loaded'] = true; |
| 159 | 159 | |
| 160 | 160 | return new Tracker( |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | public function registerRepositories() |
| 173 | 173 | { |
| 174 | - $this->app->singleton('tracker.repositories', function ($app) { |
|
| 174 | + $this->app->singleton('tracker.repositories', function($app) { |
|
| 175 | 175 | try { |
| 176 | 176 | $uaParser = new UserAgentParser($app->make('path.base')); |
| 177 | 177 | } catch (\Exception $exception) { |
@@ -355,21 +355,21 @@ discard block |
||
| 355 | 355 | |
| 356 | 356 | public function registerAuthentication() |
| 357 | 357 | { |
| 358 | - $this->app->singleton('tracker.authentication', function ($app) { |
|
| 358 | + $this->app->singleton('tracker.authentication', function($app) { |
|
| 359 | 359 | return new Authentication($app['tracker.config'], $app); |
| 360 | 360 | }); |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | public function registerCache() |
| 364 | 364 | { |
| 365 | - $this->app->singleton('tracker.cache', function ($app) { |
|
| 365 | + $this->app->singleton('tracker.cache', function($app) { |
|
| 366 | 366 | return new Cache($app['tracker.config'], $app); |
| 367 | 367 | }); |
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | protected function registerTablesCommand() |
| 371 | 371 | { |
| 372 | - $this->app->singleton('tracker.tables.command', function ($app) { |
|
| 372 | + $this->app->singleton('tracker.tables.command', function($app) { |
|
| 373 | 373 | return new TablesCommand(); |
| 374 | 374 | }); |
| 375 | 375 | |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | 'Illuminate\Routing\Events\RouteMatched', |
| 386 | 386 | ]; |
| 387 | 387 | |
| 388 | - $this->app['events']->listen($mathingEvents, function () use ($me) { |
|
| 388 | + $this->app['events']->listen($mathingEvents, function() use ($me) { |
|
| 389 | 389 | $me->getTracker()->routerMatched($me->getConfig('log_routes')); |
| 390 | 390 | }); |
| 391 | 391 | } |
@@ -407,7 +407,7 @@ discard block |
||
| 407 | 407 | $me = $this; |
| 408 | 408 | |
| 409 | 409 | $this->app->error( |
| 410 | - function (\Exception $exception, $code) use ($me) { |
|
| 410 | + function(\Exception $exception, $code) use ($me) { |
|
| 411 | 411 | $me->app['tracker']->handleException($exception, $code); |
| 412 | 412 | } |
| 413 | 413 | ); |
@@ -446,14 +446,14 @@ discard block |
||
| 446 | 446 | $me = $this; |
| 447 | 447 | |
| 448 | 448 | if (!class_exists('Illuminate\Database\Events\QueryExecuted')) { |
| 449 | - $this->app['events']->listen('illuminate.query', function ($query, |
|
| 449 | + $this->app['events']->listen('illuminate.query', function($query, |
|
| 450 | 450 | $bindings, |
| 451 | 451 | $time, |
| 452 | 452 | $name) use ($me) { |
| 453 | 453 | $me->logSqlQuery($query, $bindings, $time, $name); |
| 454 | 454 | }); |
| 455 | 455 | } else { |
| 456 | - $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function ($query) use ($me) { |
|
| 456 | + $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($query) use ($me) { |
|
| 457 | 457 | $me->logSqlQuery($query); |
| 458 | 458 | }); |
| 459 | 459 | } |
@@ -484,11 +484,11 @@ discard block |
||
| 484 | 484 | { |
| 485 | 485 | $me = $this; |
| 486 | 486 | |
| 487 | - $this->app->singleton('tracker.events', function ($app) { |
|
| 487 | + $this->app->singleton('tracker.events', function($app) { |
|
| 488 | 488 | return new EventStorage(); |
| 489 | 489 | }); |
| 490 | 490 | |
| 491 | - $this->app['events']->listen('*', function ($object = null) use ($me) { |
|
| 491 | + $this->app['events']->listen('*', function($object = null) use ($me) { |
|
| 492 | 492 | if ($me->app['tracker.events']->isOff() || !$me->isFullyBooted()) { |
| 493 | 493 | return; |
| 494 | 494 | } |
@@ -540,9 +540,9 @@ discard block |
||
| 540 | 540 | |
| 541 | 541 | $router = $this->app->make('router'); |
| 542 | 542 | |
| 543 | - $router->group(['namespace' => $namespace], function () use ($prefix, $router, $filters) { |
|
| 544 | - $router->group($filters, function () use ($prefix, $router) { |
|
| 545 | - $router->group(['prefix' => $prefix], function ($router) { |
|
| 543 | + $router->group(['namespace' => $namespace], function() use ($prefix, $router, $filters) { |
|
| 544 | + $router->group($filters, function() use ($prefix, $router) { |
|
| 545 | + $router->group(['prefix' => $prefix], function($router) { |
|
| 546 | 546 | $router->get('/', ['as' => 'tracker.stats.index', 'uses' => 'Stats@index']); |
| 547 | 547 | |
| 548 | 548 | $router->get('log/{uuid}', ['as' => 'tracker.stats.log', 'uses' => 'Stats@log']); |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | { |
| 598 | 598 | $me = $this; |
| 599 | 599 | |
| 600 | - $this->app->make('view')->composer('pragmarx/tracker::*', function ($view) use ($me) { |
|
| 600 | + $this->app->make('view')->composer('pragmarx/tracker::*', function($view) use ($me) { |
|
| 601 | 601 | $view->with('stats_layout', $me->getConfig('stats_layout')); |
| 602 | 602 | |
| 603 | 603 | $template_path = url('/').$me->getConfig('stats_template_path'); |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | |
| 609 | 609 | protected function registerUpdateGeoIpCommand() |
| 610 | 610 | { |
| 611 | - $this->app->singleton('tracker.updategeoip.command', function ($app) { |
|
| 611 | + $this->app->singleton('tracker.updategeoip.command', function($app) { |
|
| 612 | 612 | return new UpdateGeoIp(); |
| 613 | 613 | }); |
| 614 | 614 | |
@@ -619,13 +619,13 @@ discard block |
||
| 619 | 619 | { |
| 620 | 620 | $me = $this; |
| 621 | 621 | |
| 622 | - $this->app['events']->listen('router.before', function ($object = null) use ($me) { |
|
| 622 | + $this->app['events']->listen('router.before', function($object = null) use ($me) { |
|
| 623 | 623 | |
| 624 | 624 | // get auth bindings to check |
| 625 | 625 | $bindings = $me->getConfig('authentication_ioc_binding'); |
| 626 | 626 | |
| 627 | 627 | // check if all bindings are resolved |
| 628 | - $checked_bindings = array_map(function ($abstract) use ($me) { |
|
| 628 | + $checked_bindings = array_map(function($abstract) use ($me) { |
|
| 629 | 629 | return $me->app->resolved($abstract); |
| 630 | 630 | }, $bindings); |
| 631 | 631 | |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | protected function registerMessageRepository() |
| 676 | 676 | { |
| 677 | - $this->app->singleton('tracker.messages', function () { |
|
| 677 | + $this->app->singleton('tracker.messages', function() { |
|
| 678 | 678 | return new MessageRepository(); |
| 679 | 679 | }); |
| 680 | 680 | } |