Completed
Push — master ( 65a65f...c339f1 )
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}; ?>";
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
      */
60 60
     private function _registerSingletons()
61 61
     {
62
-        $this->app->singleton('command.imanghafoori.widget', function ($app) {
62
+        $this->app->singleton('command.imanghafoori.widget', function($app) {
63 63
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
64 64
         });
65 65
 
66
-        $this->app->singleton(Normalizer::class, function () {
66
+        $this->app->singleton(Normalizer::class, function() {
67 67
             $cacheNormalizer = new CacheNormalizer();
68 68
             $tplNormalizer = new TemplateNormalizer();
69 69
             $presenterNormalizer = new PresenterNormalizer();
@@ -72,23 +72,23 @@  discard block
 block discarded – undo
72 72
             return new Utils\Normalizer($tplNormalizer, $cacheNormalizer, $presenterNormalizer, $ctrlNormalizer);
73 73
         });
74 74
 
75
-        $this->app->singleton(Utils\HtmlMinifier::class, function () {
75
+        $this->app->singleton(Utils\HtmlMinifier::class, function() {
76 76
             return new Utils\HtmlMinifier();
77 77
         });
78 78
 
79
-        $this->app->singleton(Utils\DebugInfo::class, function () {
79
+        $this->app->singleton(Utils\DebugInfo::class, function() {
80 80
             return new Utils\DebugInfo();
81 81
         });
82 82
 
83
-        $this->app->singleton(Utils\Policies::class, function () {
83
+        $this->app->singleton(Utils\Policies::class, function() {
84 84
             return new Utils\Policies();
85 85
         });
86 86
 
87
-        $this->app->singleton(Utils\Cache::class, function () {
87
+        $this->app->singleton(Utils\Cache::class, function() {
88 88
             return new Utils\Cache();
89 89
         });
90 90
 
91
-        $this->app->singleton(Utils\WidgetRenderer::class, function () {
91
+        $this->app->singleton(Utils\WidgetRenderer::class, function() {
92 92
             return new Utils\WidgetRenderer();
93 93
         });
94 94
     }
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('widgetize.enable_cache') && (! app()->environment('testing'));
26
+        return config('widgetize.enable_cache') && (!app()->environment('testing'));
27 27
     }
28 28
 
29 29
     /**
Please login to merge, or discard this patch.
src/Utils/Normalizers/CacheNormalizer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function normalizeCacheLifeTime($widget)
13 13
     {
14
-        if (! property_exists($widget, 'cacheLifeTime')) {
15
-            $widget->cacheLifeTime = (int) (config('widgetize.default_cache_lifetime', 0));
14
+        if (!property_exists($widget, 'cacheLifeTime')) {
15
+            $widget->cacheLifeTime = (int)(config('widgetize.default_cache_lifetime', 0));
16 16
         }
17 17
 
18 18
         if ($widget->cacheLifeTime === 'forever') {
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function normalizeCacheTags($widget)
29 29
     {
30
-        if (! $this->cacheCanUseTags() || ! property_exists($widget, 'cacheTags')) {
30
+        if (!$this->cacheCanUseTags() || !property_exists($widget, 'cacheTags')) {
31 31
             return $widget->cacheTags = null;
32 32
         }
33 33
 
@@ -44,6 +44,6 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function cacheCanUseTags()
46 46
     {
47
-        return ! in_array(env('CACHE_DRIVER', 'file'), ['file', 'database']);
47
+        return !in_array(env('CACHE_DRIVER', 'file'), ['file', 'database']);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.