Completed
Push — master ( 31c661...c4ad3d )
by Iman
07:37
created
src/SingletonServices.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function registerSingletons($app)
19 19
     {
20
-        $app->singleton('command.imanghafoori.widget', function ($app) {
20
+        $app->singleton('command.imanghafoori.widget', function($app) {
21 21
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
22 22
         });
23 23
 
24
-        $app->singleton(Normalizer::class, function () {
24
+        $app->singleton(Normalizer::class, function() {
25 25
             $cacheNormalizer = new CacheNormalizer();
26 26
             $tplNormalizer = new TemplateNormalizer();
27 27
             $presenterNormalizer = new PresenterNormalizer();
@@ -31,27 +31,27 @@  discard block
 block discarded – undo
31 31
             return new Utils\Normalizer($tplNormalizer, $cacheNormalizer, $presenterNormalizer, $ctrlNormalizer, $contextAsNormalizer);
32 32
         });
33 33
 
34
-        $app->singleton(Utils\HtmlMinifier::class, function () {
34
+        $app->singleton(Utils\HtmlMinifier::class, function() {
35 35
             return new Utils\HtmlMinifier();
36 36
         });
37 37
 
38
-        $app->singleton(Utils\DebugInfo::class, function () {
38
+        $app->singleton(Utils\DebugInfo::class, function() {
39 39
             return new Utils\DebugInfo();
40 40
         });
41 41
 
42
-        $app->singleton(Utils\Policies::class, function () {
42
+        $app->singleton(Utils\Policies::class, function() {
43 43
             return new Utils\Policies();
44 44
         });
45 45
 
46
-        $app->singleton(Utils\Cache::class, function () {
46
+        $app->singleton(Utils\Cache::class, function() {
47 47
             return new Utils\Cache();
48 48
         });
49 49
 
50
-        $app->singleton(Utils\CacheTag::class, function () {
50
+        $app->singleton(Utils\CacheTag::class, function() {
51 51
             return new Utils\CacheTag();
52 52
         });
53 53
 
54
-        $app->singleton(Utils\WidgetRenderer::class, function () {
54
+        $app->singleton(Utils\WidgetRenderer::class, function() {
55 55
             return new Utils\WidgetRenderer();
56 56
         });
57 57
     }
Please login to merge, or discard this patch.
src/WidgetsServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $this->_registerDebugbar();
19 19
         $this->publishes([
20
-            __DIR__.'/config/config.php' => config_path('widgetize.php'),
20
+            __DIR__ . '/config/config.php' => config_path('widgetize.php'),
21 21
         ]);
22 22
 
23 23
         $this->defineDirectives();
24
-        $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
24
+        $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets');
25 25
     }
26 26
 
27 27
     /**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $omitParenthesis = version_compare($this->app->version(), '5.3', '<');
40 40
 
41
-        Blade::directive('widget', function ($expression) use ($omitParenthesis) {
41
+        Blade::directive('widget', function($expression) use ($omitParenthesis) {
42 42
             $expression = $omitParenthesis ? $expression : "($expression)";
43 43
 
44 44
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function register()
54 54
     {
55
-        $this->mergeConfigFrom(__DIR__.'/config/config.php', 'widgetize');
55
+        $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'widgetize');
56 56
         $this->commands('command.imanghafoori.widget');
57 57
         app(RouteMacros::class)->registerMacros();
58 58
         app(SingletonServices::class)->registerSingletons($this->app);
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
 
61 61
     private function _registerDebugbar()
62 62
     {
63
-        if (! $this->app->offsetExists('debugbar')) {
63
+        if (!$this->app->offsetExists('debugbar')) {
64 64
             return;
65 65
         }
66 66
 
67
-        $this->app->singleton('widgetize.debugger', function () {
67
+        $this->app->singleton('widgetize.debugger', function() {
68 68
             return new MessagesCollector('Widgets');
69 69
         });
70 70
 
Please login to merge, or discard this patch.