Completed
Push — master ( 20ab12...b724d6 )
by Iman
02:14
created
src/WidgetsServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $omitParenthesis = version_compare($this->app->version(), '5.3', '<');
23 23
 
24
-        Blade::directive('render_widget', function ($expression) use ($omitParenthesis) {
24
+        Blade::directive('render_widget', function($expression) use ($omitParenthesis) {
25 25
             $expression = $omitParenthesis ? $expression : "($expression)";
26 26
 
27 27
             return "<?php echo app(\\Imanghafoori\\Widgets\\Utils\\WidgetRenderer::class)->renderWidget{$expression}; ?>";
28 28
         });
29 29
 
30
-        $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets');
30
+        $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets');
31 31
     }
32 32
 
33 33
     /**
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function register()
39 39
     {
40
-        $this->app->singleton('command.imanghafoori.widget', function ($app) {
40
+        $this->app->singleton('command.imanghafoori.widget', function($app) {
41 41
             return $app['Imanghafoori\Widgets\WidgetGenerator'];
42 42
         });
43 43
 
44
-        $this->app->singleton(Normalizer::class, function () {
44
+        $this->app->singleton(Normalizer::class, function() {
45 45
             $cacheNormalizer = new CacheNormalizer();
46 46
             $templateNormalizer = new TemplateNormalizer();
47 47
             $presenterNormalizer = new PresenterNormalizer();
@@ -50,23 +50,23 @@  discard block
 block discarded – undo
50 50
             return new Utils\Normalizer($templateNormalizer, $cacheNormalizer, $presenterNormalizer, $controllerNormalizer);
51 51
         });
52 52
 
53
-        $this->app->singleton(Utils\HtmlMinifier::class, function () {
53
+        $this->app->singleton(Utils\HtmlMinifier::class, function() {
54 54
             return new Utils\HtmlMinifier();
55 55
         });
56 56
 
57
-        $this->app->singleton(Utils\DebugInfo::class, function () {
57
+        $this->app->singleton(Utils\DebugInfo::class, function() {
58 58
             return new Utils\DebugInfo();
59 59
         });
60 60
 
61
-        $this->app->singleton(Utils\Policies::class, function () {
61
+        $this->app->singleton(Utils\Policies::class, function() {
62 62
             return new Utils\Policies();
63 63
         });
64 64
 
65
-        $this->app->singleton(Utils\Cache::class, function () {
65
+        $this->app->singleton(Utils\Cache::class, function() {
66 66
             return new Utils\Cache();
67 67
         });
68 68
 
69
-        $this->app->singleton(Utils\WidgetRenderer::class, function () {
69
+        $this->app->singleton(Utils\WidgetRenderer::class, function() {
70 70
             return new Utils\WidgetRenderer();
71 71
         });
72 72
 
Please login to merge, or discard this patch.
src/Utils/DebugInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $tpl = str_replace('.', '\\', $tpl);
37 37
 
38 38
         $this->html =
39
-            "<div title='WidgetObj : ".get_class($this->widget).".php&#013;Template : {$tpl}.blade.php".$this->cacheState()."' style='box-shadow: 0px 0px 15px 5px #00c62b inset'>".$this->html.'</div>';
39
+            "<div title='WidgetObj : " . get_class($this->widget) . ".php&#013;Template : {$tpl}.blade.php" . $this->cacheState() . "' style='box-shadow: 0px 0px 15px 5px #00c62b inset'>" . $this->html . '</div>';
40 40
     }
41 41
 
42 42
     /**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     private function cacheState()
47 47
     {
48
-        if (! $this->policies->widgetShouldUseCache()) {
48
+        if (!$this->policies->widgetShouldUseCache()) {
49 49
             return ' &#013;Cache: is globally turned off (You should put "WIDGET_CACHE=true" in .env) ';
50 50
         }
51 51
 
@@ -54,6 +54,6 @@  discard block
 block discarded – undo
54 54
 
55 55
     private function addHtmlComments()
56 56
     {
57
-        $this->html = "<!-- '{".get_class($this->widget)."' Widget Start -->".$this->html."<!-- '".get_class($this->widget)."' Widget End -->";
57
+        $this->html = "<!-- '{" . get_class($this->widget) . "' Widget Start -->" . $this->html . "<!-- '" . get_class($this->widget) . "' Widget End -->";
58 58
     }
59 59
 }
Please login to merge, or discard this patch.