Completed
Push — master ( 9bb571...65a65f )
by Iman
02:13
created
src/WidgetsServiceProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $omitParenthesis = version_compare($this->app->version(), '5.3', '<');
37 37
 
38
-        Blade::directive('widget', function ($expression) use ($omitParenthesis) {
38
+        Blade::directive('widget', function($expression) use ($omitParenthesis) {
39 39
             $expression = $omitParenthesis ? $expression : "($expression)";
40 40
 
41 41
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 
57 57
     private function _registerSingletons()
58 58
     {
59
-        $this->app->singleton('command.imanghafoori.widget', function ($app) {
59
+        $this->app->singleton('command.imanghafoori.widget', function($app) {
60 60
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
61 61
         });
62 62
 
63
-        $this->app->singleton(Normalizer::class, function () {
63
+        $this->app->singleton(Normalizer::class, function() {
64 64
             $cacheNormalizer = new CacheNormalizer();
65 65
             $tplNormalizer = new TemplateNormalizer();
66 66
             $presenterNormalizer = new PresenterNormalizer();
@@ -69,23 +69,23 @@  discard block
 block discarded – undo
69 69
             return new Utils\Normalizer($tplNormalizer, $cacheNormalizer, $presenterNormalizer, $ctrlNormalizer);
70 70
         });
71 71
 
72
-        $this->app->singleton(Utils\HtmlMinifier::class, function () {
72
+        $this->app->singleton(Utils\HtmlMinifier::class, function() {
73 73
             return new Utils\HtmlMinifier();
74 74
         });
75 75
 
76
-        $this->app->singleton(Utils\DebugInfo::class, function () {
76
+        $this->app->singleton(Utils\DebugInfo::class, function() {
77 77
             return new Utils\DebugInfo();
78 78
         });
79 79
 
80
-        $this->app->singleton(Utils\Policies::class, function () {
80
+        $this->app->singleton(Utils\Policies::class, function() {
81 81
             return new Utils\Policies();
82 82
         });
83 83
 
84
-        $this->app->singleton(Utils\Cache::class, function () {
84
+        $this->app->singleton(Utils\Cache::class, function() {
85 85
             return new Utils\Cache();
86 86
         });
87 87
 
88
-        $this->app->singleton(Utils\WidgetRenderer::class, function () {
88
+        $this->app->singleton(Utils\WidgetRenderer::class, function() {
89 89
             return new Utils\WidgetRenderer();
90 90
         });
91 91
     }
Please login to merge, or discard this patch.
src/Utils/WidgetRenderer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     private function _generateHtml($widget, ...$args)
52 52
     {
53 53
         // Everything inside this function is executed only when the cache is not available.
54
-        $expensivePhpCode = function () use ($widget, $args) {
54
+        $expensivePhpCode = function() use ($widget, $args) {
55 55
             $this->_makeDataForView($widget, $args);
56 56
             // render the template with the resulting data.
57 57
             return $this->renderTemplate($widget);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      */
111 111
     private function _makeWidgetObj($widget)
112 112
     {
113
-        $widget = app()->getNamespace().'Widgets\\'.$widget;
113
+        $widget = app()->getNamespace() . 'Widgets\\' . $widget;
114 114
         return $widgetObj = app($widget);
115 115
     }
116 116
 }
Please login to merge, or discard this patch.
src/Utils/Policies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function widgetShouldUseCache()
25 25
     {
26
-        return config('enable_cache') && (! app()->environment('testing'));
26
+        return config('enable_cache') && (!app()->environment('testing'));
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.