@@ -44,7 +44,7 @@ |
||
44 | 44 | private function generateHtml($widget, ...$args) |
45 | 45 | { |
46 | 46 | // Everything inside this function is executed only when the cache is not available. |
47 | - $expensivePhpCode = function () use ($widget, $args) { |
|
47 | + $expensivePhpCode = function() use ($widget, $args) { |
|
48 | 48 | $this->prepareDataForView($widget, $args); |
49 | 49 | // render the template with the resulting data. |
50 | 50 | return $this->renderTemplate($widget); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | public function normalizeWidgetConfig(BaseWidget $widget) |
13 | 13 | { |
14 | 14 | // to avoid normalizing a widget multiple times unnecessarily : |
15 | - if(isset($widget->isNormalized)){ |
|
15 | + if (isset($widget->isNormalized)) { |
|
16 | 16 | return null; |
17 | 17 | } |
18 | 18 |
@@ -14,11 +14,11 @@ discard block |
||
14 | 14 | */ |
15 | 15 | public function boot() |
16 | 16 | { |
17 | - \Blade::directive('include_widget', function ($expression) { |
|
17 | + \Blade::directive('include_widget', function($expression) { |
|
18 | 18 | return "<?php echo $expression; ?>"; |
19 | 19 | }); |
20 | 20 | |
21 | - $this->loadViewsFrom($this->app->basePath().'/app/Widgets/', 'Widgets'); |
|
21 | + $this->loadViewsFrom($this->app->basePath() . '/app/Widgets/', 'Widgets'); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -28,31 +28,31 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function register() |
30 | 30 | { |
31 | - $this->app->singleton('command.imanghafoori.widget', function ($app) { |
|
31 | + $this->app->singleton('command.imanghafoori.widget', function($app) { |
|
32 | 32 | return $app['Imanghafoori\Widgets\WidgetGenerator']; |
33 | 33 | }); |
34 | 34 | |
35 | - $this->app->singleton('imanghafoori.widget.normalizer', function ($app) { |
|
35 | + $this->app->singleton('imanghafoori.widget.normalizer', function($app) { |
|
36 | 36 | return new Utils\Normalizer(); |
37 | 37 | }); |
38 | 38 | |
39 | - $this->app->singleton('imanghafoori.widget.minifier', function ($app) { |
|
39 | + $this->app->singleton('imanghafoori.widget.minifier', function($app) { |
|
40 | 40 | return new Utils\HtmlMinifier(); |
41 | 41 | }); |
42 | 42 | |
43 | - $this->app->singleton('imanghafoori.widget.debugInfo', function ($app) { |
|
43 | + $this->app->singleton('imanghafoori.widget.debugInfo', function($app) { |
|
44 | 44 | return new Utils\DebugInfo(); |
45 | 45 | }); |
46 | 46 | |
47 | - $this->app->singleton('imanghafoori.widget.policies', function ($app) { |
|
47 | + $this->app->singleton('imanghafoori.widget.policies', function($app) { |
|
48 | 48 | return new Utils\Policies(); |
49 | 49 | }); |
50 | 50 | |
51 | - $this->app->singleton('imanghafoori.widget.cache', function ($app) { |
|
51 | + $this->app->singleton('imanghafoori.widget.cache', function($app) { |
|
52 | 52 | return new Utils\Cache(); |
53 | 53 | }); |
54 | 54 | |
55 | - $this->app->singleton('imanghafoori.widget.renderer', function ($app) { |
|
55 | + $this->app->singleton('imanghafoori.widget.renderer', function($app) { |
|
56 | 56 | return new Utils\WidgetRenderer(); |
57 | 57 | }); |
58 | 58 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function __invoke(...$args) |
24 | 24 | { |
25 | - return $this->render(...$args);; |
|
25 | + return $this->render(...$args); ; |
|
26 | 26 | } |
27 | 27 | /** |
28 | 28 | * This method is called when you try to print the object like an string in blade files. |
@@ -30,12 +30,12 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function __toString() |
32 | 32 | { |
33 | - return $this->render();; |
|
33 | + return $this->render(); ; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function render(...$args) |
37 | 37 | { |
38 | - return app('imanghafoori.widget.renderer')->renderWidget($this,...$args); |
|
38 | + return app('imanghafoori.widget.renderer')->renderWidget($this, ...$args); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | } |
42 | 42 | \ No newline at end of file |