@@ -45,7 +45,7 @@ |
||
45 | 45 | private function _generateHtml($widget, ...$args) |
46 | 46 | { |
47 | 47 | // Everything inside this function is executed only when the cache is not available. |
48 | - $expensivePhpCode = function () use ($widget, $args) { |
|
48 | + $expensivePhpCode = function() use ($widget, $args) { |
|
49 | 49 | $this->_makeDataForView($widget, $args); |
50 | 50 | // render the template with the resulting data. |
51 | 51 | return $this->renderTemplate($widget); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | /** |
8 | 8 | * Figures out which template to render. |
9 | - * @param $widget |
|
9 | + * @param \Imanghafoori\Widgets\BaseWidget $widget |
|
10 | 10 | * @return null |
11 | 11 | */ |
12 | 12 | public function normalizeTemplateName($widget) |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Figures out what the variable name should be in view file. |
53 | - * @param $widget |
|
53 | + * @param BaseWidget $widget |
|
54 | 54 | * @return null |
55 | 55 | */ |
56 | 56 | private function normalizeContextAs($widget) |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function boot() |
20 | 20 | { |
21 | - \Blade::directive('include_widget', function ($expression) { |
|
21 | + \Blade::directive('include_widget', function($expression) { |
|
22 | 22 | return "<?php echo $expression; ?>"; |
23 | 23 | }); |
24 | 24 | |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function register() |
34 | 34 | { |
35 | - $this->app->singleton('command.imanghafoori.widget', function ($app) { |
|
35 | + $this->app->singleton('command.imanghafoori.widget', function($app) { |
|
36 | 36 | return $app['Imanghafoori\Widgets\WidgetGenerator']; |
37 | 37 | }); |
38 | 38 | |
39 | - $this->app->singleton('imanghafoori.widget.normalizer', function () { |
|
39 | + $this->app->singleton('imanghafoori.widget.normalizer', function() { |
|
40 | 40 | $cacheNormalizer = new CacheNormalizer(); |
41 | 41 | $templateNormalizer = new TemplateNormalizer(); |
42 | 42 | $presenterNormalizer = new PresenterNormalizer(); |
@@ -45,23 +45,23 @@ discard block |
||
45 | 45 | return new Utils\Normalizer($templateNormalizer, $cacheNormalizer, $presenterNormalizer, $controllerNormalizer); |
46 | 46 | }); |
47 | 47 | |
48 | - $this->app->singleton('imanghafoori.widget.minifier', function () { |
|
48 | + $this->app->singleton('imanghafoori.widget.minifier', function() { |
|
49 | 49 | return new Utils\HtmlMinifier(); |
50 | 50 | }); |
51 | 51 | |
52 | - $this->app->singleton('imanghafoori.widget.debugInfo', function () { |
|
52 | + $this->app->singleton('imanghafoori.widget.debugInfo', function() { |
|
53 | 53 | return new Utils\DebugInfo(); |
54 | 54 | }); |
55 | 55 | |
56 | - $this->app->singleton('imanghafoori.widget.policies', function () { |
|
56 | + $this->app->singleton('imanghafoori.widget.policies', function() { |
|
57 | 57 | return new Utils\Policies(); |
58 | 58 | }); |
59 | 59 | |
60 | - $this->app->singleton('imanghafoori.widget.cache', function () { |
|
60 | + $this->app->singleton('imanghafoori.widget.cache', function() { |
|
61 | 61 | return new Utils\Cache(); |
62 | 62 | }); |
63 | 63 | |
64 | - $this->app->singleton('imanghafoori.widget.renderer', function () { |
|
64 | + $this->app->singleton('imanghafoori.widget.renderer', function() { |
|
65 | 65 | return new Utils\WidgetRenderer(); |
66 | 66 | }); |
67 | 67 |