Completed
Push — master ( 77f39a...815970 )
by Iman
02:14
created
src/Utils/CacheTag.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     /**
49 49
      * @param $tag
50
-     * @param $token
50
+     * @param string $token
51 51
      */
52 52
     private function persistToken($tag, $token)
53 53
     {
Please login to merge, or discard this 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
      */
52 52
     private function persistToken($tag, $token)
53 53
     {
54
-        \Cache::forever('9z10_o6cg_r'.$tag, $token);
54
+        \Cache::forever('9z10_o6cg_r' . $tag, $token);
55 55
     }
56 56
 
57 57
     /**
@@ -60,6 +60,6 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function getPersistedToken($tag)
62 62
     {
63
-        return \Cache::get('9z10_o6cg_r'.$tag, null);
63
+        return \Cache::get('9z10_o6cg_r' . $tag, null);
64 64
     }
65 65
 }
Please login to merge, or discard this patch.
src/WidgetsServiceProvider.php 1 patch
Spacing   +9 added lines, -9 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,27 +72,27 @@  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\CacheTag::class, function () {
91
+        $this->app->singleton(Utils\CacheTag::class, function() {
92 92
             return new Utils\CacheTag();
93 93
         });
94 94
 
95
-        $this->app->singleton(Utils\WidgetRenderer::class, function () {
95
+        $this->app->singleton(Utils\WidgetRenderer::class, function() {
96 96
             return new Utils\WidgetRenderer();
97 97
         });
98 98
     }
Please login to merge, or discard this patch.
src/Utils/Cache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      */
86 86
     private function getTagTokens($cacheTags)
87 87
     {
88
-        return array_map(function ($tag) {
88
+        return array_map(function($tag) {
89 89
             return $this->_cacheTag->getTagToken($tag);
90 90
         }, $cacheTags);
91 91
     }
Please login to merge, or discard this patch.
src/Utils/Normalizers/CacheNormalizer.php 1 patch
Spacing   +3 added lines, -3 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' || $widget->cacheLifeTime < 0) {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function normalizeCacheTags($widget)
30 30
     {
31
-        if (! property_exists($widget, 'cacheTags')) {
31
+        if (!property_exists($widget, 'cacheTags')) {
32 32
             return $widget->cacheTags = [];
33 33
         }
34 34
 
Please login to merge, or discard this patch.