Completed
Pull Request — master (#555)
by
unknown
34s
created
src/Tracker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     protected function logUntrackable($item)
213 213
     {
214 214
         if ($this->config->get('log_untrackable_sessions') && !isset($this->loggedItems[$item])) {
215
-            $this->getLogger()->warning('TRACKER (unable to track item): ' . $item);
215
+            $this->getLogger()->warning('TRACKER (unable to track item): '.$item);
216 216
 
217 217
             $this->loggedItems[$item] = $item;
218 218
         }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         ];
244 244
 
245 245
         $authSessionPrefix = $this->config->get('auth_session_prefix');
246
-        $authSessions      = collect(session()->all())->filter(function ($val, $key) use ($authSessionPrefix) {
246
+        $authSessions      = collect(session()->all())->filter(function($val, $key) use ($authSessionPrefix) {
247 247
             return strpos($key, $authSessionPrefix) !== false;
248 248
         });
249 249
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         );
327 327
 
328 328
         if (!$trackable) {
329
-            $this->logUntrackable('environment ' . $this->laravel->environment() . ' is not trackable.');
329
+            $this->logUntrackable('environment '.$this->laravel->environment().' is not trackable.');
330 330
         }
331 331
 
332 332
         return $trackable;
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         );
341 341
 
342 342
         if (!$trackable) {
343
-            $this->logUntrackable($ipAddress . ' is not trackable.');
343
+            $this->logUntrackable($ipAddress.' is not trackable.');
344 344
         }
345 345
 
346 346
         return $trackable;
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
         }
452 452
 
453 453
         if (!$trackable = $this->dataRepositoryManager->routeIsTrackable($this->route)) {
454
-            $this->logUntrackable('route ' . $this->route->getCurrentRoute()->getName() . ' is not trackable.');
454
+            $this->logUntrackable('route '.$this->route->getCurrentRoute()->getName().' is not trackable.');
455 455
         }
456 456
 
457 457
         return $trackable;
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     public function pathIsTrackable()
461 461
     {
462 462
         if (!$trackable = $this->dataRepositoryManager->pathIsTrackable($this->request->path())) {
463
-            $this->logUntrackable('path ' . $this->request->path() . ' is not trackable.');
463
+            $this->logUntrackable('path '.$this->request->path().' is not trackable.');
464 464
         }
465 465
 
466 466
         return $trackable;
Please login to merge, or discard this patch.
src/Vendor/Laravel/ServiceProvider.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     protected function registerTracker()
155 155
     {
156
-        $this->app->singleton('tracker', function ($app) {
156
+        $this->app->singleton('tracker', function($app) {
157 157
             $app['tracker.loaded'] = true;
158 158
 
159 159
             return new Tracker(
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     public function registerRepositories()
172 172
     {
173
-        $this->app->singleton('tracker.repositories', function ($app) {
173
+        $this->app->singleton('tracker.repositories', function($app) {
174 174
             try {
175 175
                 $uaParser = new UserAgentParser($app->make('path.base'));
176 176
             } catch (\Exception $exception) {
@@ -327,14 +327,14 @@  discard block
 block discarded – undo
327 327
 
328 328
     public function registerAuthentication()
329 329
     {
330
-        $this->app->singleton('tracker.authentication', function ($app) {
330
+        $this->app->singleton('tracker.authentication', function($app) {
331 331
             return new Authentication($app['tracker.config'], $app);
332 332
         });
333 333
     }
334 334
 
335 335
     public function registerCache()
336 336
     {
337
-        $this->app->singleton('tracker.cache', function ($app) {
337
+        $this->app->singleton('tracker.cache', function($app) {
338 338
             return new Cache($app['tracker.config'], $app);
339 339
         });
340 340
     }
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     protected function registerTablesCommand()
343 343
     {
344 344
         if ($this->app->runningInConsole()) {
345
-            $this->app->singleton('tracker.tables.command', function ($app) {
345
+            $this->app->singleton('tracker.tables.command', function($app) {
346 346
                 return new TablesCommand();
347 347
             });
348 348
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
             'Illuminate\Routing\Events\RouteMatched',
360 360
         ];
361 361
 
362
-        $this->app['events']->listen($mathingEvents, function () use ($me) {
362
+        $this->app['events']->listen($mathingEvents, function() use ($me) {
363 363
             $me->getTracker()->routerMatched($me->getConfig('log_routes'));
364 364
         });
365 365
     }
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         $me = $this;
411 411
 
412 412
         if (!class_exists('Illuminate\Database\Events\QueryExecuted')) {
413
-            $this->app['events']->listen('illuminate.query', function (
413
+            $this->app['events']->listen('illuminate.query', function(
414 414
                 $query,
415 415
                 $bindings,
416 416
                 $time,
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
                 $me->logSqlQuery($query, $bindings, $time, $name);
420 420
             });
421 421
         } else {
422
-            $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function ($query) use ($me) {
422
+            $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($query) use ($me) {
423 423
                 $me->logSqlQuery($query);
424 424
             });
425 425
         }
@@ -450,11 +450,11 @@  discard block
 block discarded – undo
450 450
     {
451 451
         $me = $this;
452 452
 
453
-        $this->app->singleton('tracker.events', function ($app) {
453
+        $this->app->singleton('tracker.events', function($app) {
454 454
             return new EventStorage();
455 455
         });
456 456
 
457
-        $this->app['events']->listen('*', function ($object = null) use ($me) {
457
+        $this->app['events']->listen('*', function($object = null) use ($me) {
458 458
             if ($me->app['tracker.events']->isOff() || !$me->isFullyBooted()) {
459 459
                 return;
460 460
             }
@@ -506,9 +506,9 @@  discard block
 block discarded – undo
506 506
 
507 507
         $router = $this->app->make('router');
508 508
 
509
-        $router->group(['namespace' => $namespace], function () use ($prefix, $router, $filters) {
510
-            $router->group($filters, function () use ($prefix, $router) {
511
-                $router->group(['prefix' => $prefix], function ($router) {
509
+        $router->group(['namespace' => $namespace], function() use ($prefix, $router, $filters) {
510
+            $router->group($filters, function() use ($prefix, $router) {
511
+                $router->group(['prefix' => $prefix], function($router) {
512 512
                     $router->get('/', ['as' => 'tracker.stats.index', 'uses' => 'Stats@index']);
513 513
 
514 514
                     $router->get('log/{uuid}', ['as' => 'tracker.stats.log', 'uses' => 'Stats@log']);
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
      */
546 546
     public function getPackageDir()
547 547
     {
548
-        return __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..';
548
+        return __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..';
549 549
     }
550 550
 
551 551
     /**
@@ -563,10 +563,10 @@  discard block
 block discarded – undo
563 563
     {
564 564
         $me = $this;
565 565
 
566
-        $this->app->make('view')->composer('pragmarx/tracker::*', function ($view) use ($me) {
566
+        $this->app->make('view')->composer('pragmarx/tracker::*', function($view) use ($me) {
567 567
             $view->with('stats_layout', $me->getConfig('stats_layout'));
568 568
 
569
-            $template_path = url('/') . $me->getConfig('stats_template_path');
569
+            $template_path = url('/').$me->getConfig('stats_template_path');
570 570
 
571 571
             $view->with('stats_template_path', $template_path);
572 572
         });
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
     protected function registerUpdateGeoIpCommand()
576 576
     {
577 577
         if ($this->app->runningInConsole()) {
578
-            $this->app->singleton('tracker.updategeoip.command', function ($app) {
578
+            $this->app->singleton('tracker.updategeoip.command', function($app) {
579 579
                 return new UpdateGeoIp();
580 580
             });
581 581
 
@@ -587,13 +587,13 @@  discard block
 block discarded – undo
587 587
     {
588 588
         $me = $this;
589 589
 
590
-        $this->app['events']->listen('router.before', function ($object = null) use ($me) {
590
+        $this->app['events']->listen('router.before', function($object = null) use ($me) {
591 591
 
592 592
             // get auth bindings to check
593 593
             $bindings = $me->getConfig('authentication_ioc_binding');
594 594
 
595 595
             // check if all bindings are resolved
596
-            $checked_bindings = array_map(function ($abstract) use ($me) {
596
+            $checked_bindings = array_map(function($abstract) use ($me) {
597 597
                 return $me->app->resolved($abstract);
598 598
             }, $bindings);
599 599
 
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 
625 625
     public function getRootDirectory()
626 626
     {
627
-        return __DIR__ . '/../..';
627
+        return __DIR__.'/../..';
628 628
     }
629 629
 
630 630
     protected function getAppUrl()
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 
635 635
     public function loadTranslations()
636 636
     {
637
-        $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'tracker');
637
+        $this->loadTranslationsFrom(__DIR__.'/../../lang', 'tracker');
638 638
     }
639 639
 
640 640
     /**
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
      */
643 643
     protected function registerMessageRepository()
644 644
     {
645
-        $this->app->singleton('tracker.messages', function () {
645
+        $this->app->singleton('tracker.messages', function() {
646 646
             return new MessageRepository();
647 647
         });
648 648
     }
Please login to merge, or discard this patch.
src/Support/UserAgentParser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
     public function getOperatingSystemVersion(): string
41 41
     {
42
-        return $this->operatingSystem->major .
43
-            ($this->operatingSystem->minor !== null ? '.' . $this->operatingSystem->minor : '') .
44
-            ($this->operatingSystem->patch !== null ? '.' . $this->operatingSystem->patch : '');
42
+        return $this->operatingSystem->major.
43
+            ($this->operatingSystem->minor !== null ? '.'.$this->operatingSystem->minor : '').
44
+            ($this->operatingSystem->patch !== null ? '.'.$this->operatingSystem->patch : '');
45 45
     }
46 46
 
47 47
     protected function getUserAgent(string $userAgent)
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
     public function getUserAgentVersion(): string
61 61
     {
62
-        return $this->userAgent->major .
63
-            ($this->userAgent->minor !== null ? '.' . $this->userAgent->minor : '') .
64
-            ($this->userAgent->patch !== null ? '.' . $this->userAgent->patch : '');
62
+        return $this->userAgent->major.
63
+            ($this->userAgent->minor !== null ? '.'.$this->userAgent->minor : '').
64
+            ($this->userAgent->patch !== null ? '.'.$this->userAgent->patch : '');
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
src/Data/RepositoryManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
             $domain = array_pop($parts);
418 418
 
419 419
             if (count($parts) > 0) {
420
-                $domain = array_pop($parts) . '.' . $domain;
420
+                $domain = array_pop($parts).'.'.$domain;
421 421
             }
422 422
 
423 423
             $domain_id = $this->getDomainId($domain);
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             return $name;
499 499
         }
500 500
 
501
-        return '/' . $route->current()->uri();
501
+        return '/'.$route->current()->uri();
502 502
     }
503 503
 
504 504
     /**
Please login to merge, or discard this patch.
src/Services/Authentication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
     private function getAuthentication()
54 54
     {
55
-        foreach ((array)$this->config->get('authentication_ioc_binding') as $binding) {
55
+        foreach ((array) $this->config->get('authentication_ioc_binding') as $binding) {
56 56
             $this->authentication[] = $this->app->make($binding);
57 57
         }
58 58
 
Please login to merge, or discard this patch.