@@ -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) |
@@ -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 | |
41 | 41 | $cacheNormalizer = new CacheNormalizer(); |
42 | 42 | $templateNormalizer = new TemplateNormalizer(); |
@@ -46,23 +46,23 @@ discard block |
||
46 | 46 | return new Utils\Normalizer($templateNormalizer, $cacheNormalizer, $presenterNormalizer, $controllerNormalizer); |
47 | 47 | }); |
48 | 48 | |
49 | - $this->app->singleton('imanghafoori.widget.minifier', function () { |
|
49 | + $this->app->singleton('imanghafoori.widget.minifier', function() { |
|
50 | 50 | return new Utils\HtmlMinifier(); |
51 | 51 | }); |
52 | 52 | |
53 | - $this->app->singleton('imanghafoori.widget.debugInfo', function () { |
|
53 | + $this->app->singleton('imanghafoori.widget.debugInfo', function() { |
|
54 | 54 | return new Utils\DebugInfo(); |
55 | 55 | }); |
56 | 56 | |
57 | - $this->app->singleton('imanghafoori.widget.policies', function () { |
|
57 | + $this->app->singleton('imanghafoori.widget.policies', function() { |
|
58 | 58 | return new Utils\Policies(); |
59 | 59 | }); |
60 | 60 | |
61 | - $this->app->singleton('imanghafoori.widget.cache', function () { |
|
61 | + $this->app->singleton('imanghafoori.widget.cache', function() { |
|
62 | 62 | return new Utils\Cache(); |
63 | 63 | }); |
64 | 64 | |
65 | - $this->app->singleton('imanghafoori.widget.renderer', function () { |
|
65 | + $this->app->singleton('imanghafoori.widget.renderer', function() { |
|
66 | 66 | return new Utils\WidgetRenderer(); |
67 | 67 | }); |
68 | 68 |
@@ -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) |