@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | class TemplateContext |
10 | 10 | { |
11 | - private const ESCAPE_FLAGS = ENT_QUOTES | ENT_SUBSTITUTE; |
|
11 | + private const ESCAPE_FLAGS = ENT_QUOTES|ENT_SUBSTITUTE; |
|
12 | 12 | private const ESCAPE_ENCODING = 'UTF-8'; |
13 | 13 | |
14 | 14 | public function __construct( |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | public function context(array $values = []): array |
30 | 30 | { |
31 | 31 | return array_map( |
32 | - function ($value): mixed { |
|
32 | + function($value): mixed { |
|
33 | 33 | if (is_object($value) && in_array($value::class, $this->whitelist)) { |
34 | 34 | return $value; |
35 | 35 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | { |
100 | 100 | $templateContext = $this->templateContext($context, $whitelist, $autoescape); |
101 | 101 | |
102 | - $load = function (string $templatePath, array $context = []): void { |
|
102 | + $load = function(string $templatePath, array $context = []): void { |
|
103 | 103 | // Hide $templatePath. Could be overwritten if $context['templatePath'] exists. |
104 | 104 | $____template_path____ = $templatePath; |
105 | 105 | |
@@ -119,8 +119,7 @@ discard block |
||
119 | 119 | $load( |
120 | 120 | $this->path, |
121 | 121 | $autoescape ? |
122 | - $templateContext->context() : |
|
123 | - $context |
|
122 | + $templateContext->context() : $context |
|
124 | 123 | ); |
125 | 124 | |
126 | 125 | return ob_get_clean(); |