Completed
Pull Request — master (#39)
by
unknown
01:37
created
src/Understand/UnderstandLaravel5/UnderstandLaravel5ServiceProvider.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
 class UnderstandLaravel5ServiceProvider extends ServiceProvider
13 13
 {
14 14
 
15
-	/**
16
-	 * Indicates if loading of the provider is deferred.
17
-	 *
18
-	 * @var bool
19
-	 */
20
-	protected $defer = false;
21
-
22
-	/**
23
-	 * Bootstrap the application events.
24
-	 *
25
-	 * @return void
26
-	 */
27
-	public function boot()
28
-	{
15
+    /**
16
+     * Indicates if loading of the provider is deferred.
17
+     *
18
+     * @var bool
19
+     */
20
+    protected $defer = false;
21
+
22
+    /**
23
+     * Bootstrap the application events.
24
+     *
25
+     * @return void
26
+     */
27
+    public function boot()
28
+    {
29 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');
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
         }
42 42
 
43 43
         $this->registerBladeDirectives();
44
-	}
44
+    }
45 45
 
46 46
     /**
47 47
      * Register Blade directives.
48 48
      *
49 49
      * @return void
50 50
      */
51
-	protected function registerBladeDirectives()
51
+    protected function registerBladeDirectives()
52 52
     {
53 53
         $configuration = UnderstandJsProvider::getJsConfig();
54 54
 
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
         }
96 96
     }
97 97
 
98
-	/**
99
-	 * Register the service provider.
100
-	 *
101
-	 * @return void
102
-	 */
103
-	public function register()
104
-	{
105
-		$this->registerConfig();
98
+    /**
99
+     * Register the service provider.
100
+     *
101
+     * @return void
102
+     */
103
+    public function register()
104
+    {
105
+        $this->registerConfig();
106 106
         $this->registerFieldProvider();
107 107
         $this->registerJsProvider();
108 108
         $this->registerDataCollector();
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $this->registerLogger();
111 111
         $this->registerExceptionEncoder();
112 112
         $this->registerEventLoggers();
113
-	}
113
+    }
114 114
 
115 115
     /**
116 116
      * Register config
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
                 return preg_replace($pattern, $out, $view);
76 76
             });
77
-        }
78
-        else
77
+        } else
79 78
         {
80 79
             Blade::directive('understandJsConfig', function () use ($configuration)
81 80
             {
@@ -313,8 +312,7 @@  discard block
 block discarded – undo
313 312
             {
314 313
                 $this->handleEvent($level, $message, $context);
315 314
             });
316
-        }
317
-        else
315
+        } else
318 316
         {
319 317
             // starting from L5.4 MessageLogged event class was introduced
320 318
             // https://github.com/laravel/framework/commit/57c82d095c356a0fe0f9381536afec768cdcc072
@@ -342,8 +340,7 @@  discard block
 block discarded – undo
342 340
                     $this->app['understand.tokenProvider']->generate();
343 341
                     $this->app['understand.dataCollector']->reset();
344 342
                 });
345
-            }
346
-            else
343
+            } else
347 344
             {
348 345
                 $this->app['events']->listen('Illuminate\Queue\Events\JobProcessing', function()
349 346
                 {
@@ -373,8 +370,7 @@  discard block
 block discarded – undo
373 370
                     'time' => $time,
374 371
                 ]);
375 372
             });
376
-        }
377
-        else
373
+        } else
378 374
         {
379 375
             // https://laravel.com/api/5.3/Illuminate/Database/Events/QueryExecuted.html
380 376
             $this->app['events']->listen('Illuminate\Database\Events\QueryExecuted', function($event)
@@ -416,8 +412,7 @@  discard block
 block discarded – undo
416 412
             unset($context['exception']);
417 413
 
418 414
             $this->app['understand.exceptionLogger']->logError($level, $exception, $context);
419
-        }
420
-        else
415
+        } else
421 416
         {
422 417
             $this->app['understand.exceptionLogger']->logError($level, $message, $context);
423 418
         }
Please login to merge, or discard this patch.