Completed
Push — master ( 6cf06f...f86420 )
by Iman
02:05
created
src/WidgetsServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function boot()
21 21
     {
22 22
         $this->_defineDirectives();
23
-        $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
23
+        $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets');
24 24
     }
25 25
 
26 26
     /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function register()
32 32
     {
33
-        $this->app->singleton('command.imanghafoori.widget', function ($app) {
33
+        $this->app->singleton('command.imanghafoori.widget', function($app) {
34 34
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
35 35
         });
36 36
 
37
-        $this->app->singleton(Normalizer::class, function () {
37
+        $this->app->singleton(Normalizer::class, function() {
38 38
             $cacheNormalizer = new CacheNormalizer();
39 39
             $templateNormalizer = new TemplateNormalizer();
40 40
             $presenterNormalizer = new PresenterNormalizer();
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
             return new Utils\Normalizer($templateNormalizer, $cacheNormalizer, $presenterNormalizer, $controllerNormalizer);
44 44
         });
45 45
 
46
-        $this->app->singleton(Utils\HtmlMinifier::class, function () {
46
+        $this->app->singleton(Utils\HtmlMinifier::class, function() {
47 47
             return new Utils\HtmlMinifier();
48 48
         });
49 49
 
50
-        $this->app->singleton(Utils\DebugInfo::class, function () {
50
+        $this->app->singleton(Utils\DebugInfo::class, function() {
51 51
             return new Utils\DebugInfo();
52 52
         });
53 53
 
54
-        $this->app->singleton(Utils\Policies::class, function () {
54
+        $this->app->singleton(Utils\Policies::class, function() {
55 55
             return new Utils\Policies();
56 56
         });
57 57
 
58
-        $this->app->singleton(Utils\Cache::class, function () {
58
+        $this->app->singleton(Utils\Cache::class, function() {
59 59
             return new Utils\Cache();
60 60
         });
61 61
 
62
-        $this->app->singleton(Utils\WidgetRenderer::class, function () {
62
+        $this->app->singleton(Utils\WidgetRenderer::class, function() {
63 63
             return new Utils\WidgetRenderer();
64 64
         });
65 65
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $omitParenthesis = version_compare($this->app->version(), '5.3', '<');
75 75
 
76
-        Blade::directive('widget', function ($expression) use ($omitParenthesis) {
76
+        Blade::directive('widget', function($expression) use ($omitParenthesis) {
77 77
             $expression = $omitParenthesis ? $expression : "($expression)";
78 78
 
79 79
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
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
@@ -46,6 +46,6 @@
 block discarded – undo
46 46
      */
47 47
     private function _makeCacheKey($arg, $widget)
48 48
     {
49
-        return md5(json_encode($arg, JSON_FORCE_OBJECT).app()->getLocale().$widget->template.get_class($widget));
49
+        return md5(json_encode($arg, JSON_FORCE_OBJECT) . app()->getLocale() . $widget->template . get_class($widget));
50 50
     }
51 51
 }
Please login to merge, or discard this patch.