@@ -131,10 +131,10 @@ |
||
131 | 131 | $view = new View($viewsPath, $helpers); |
132 | 132 | |
133 | 133 | // TODO move to own ViewExtension class |
134 | - $view->registerHelper('escape', function (string $string) { |
|
134 | + $view->registerHelper('escape', function(string $string) { |
|
135 | 135 | return htmlspecialchars($string); |
136 | 136 | }); |
137 | - $view->registerHelper('url', function ($args) { |
|
137 | + $view->registerHelper('url', function($args) { |
|
138 | 138 | return UrlHelper::to($args); |
139 | 139 | }); |
140 | 140 |
@@ -50,14 +50,14 @@ |
||
50 | 50 | if (static::MODE_PREPEND == $this->mode) { |
51 | 51 | $contents = str_replace( |
52 | 52 | '<body>', |
53 | - "<body>".$this->string, |
|
53 | + "<body>" . $this->string, |
|
54 | 54 | $contents |
55 | 55 | ); |
56 | 56 | } |
57 | 57 | if (static::MODE_APPEND == $this->mode) { |
58 | 58 | $contents = str_replace( |
59 | 59 | '</body>', |
60 | - $this->string.'</body>', |
|
60 | + $this->string . '</body>', |
|
61 | 61 | $contents |
62 | 62 | ); |
63 | 63 | } |
@@ -9,10 +9,10 @@ |
||
9 | 9 | { |
10 | 10 | public function register(View $view) |
11 | 11 | { |
12 | - $view->registerHelper('hello', function (string $name = '') { |
|
12 | + $view->registerHelper('hello', function(string $name = '') { |
|
13 | 13 | return sprintf("Hallo %s", $name); |
14 | 14 | }); |
15 | - $view->registerHelper('add', function (float ...$operands) { |
|
15 | + $view->registerHelper('add', function(float ...$operands) { |
|
16 | 16 | return array_sum($operands); |
17 | 17 | }); |
18 | 18 | } |