@@ -152,7 +152,7 @@ |
||
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | // Process replacements |
| 155 | - /** @var string $replace **/ |
|
| 155 | + /** @var string $replace **/ |
|
| 156 | 156 | foreach ($this->tplVars AS $find => $replace) { |
| 157 | 157 | $contents = \str_replace(\sprintf( |
| 158 | 158 | '%s%s%s', |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Simple Template Engine |
@@ -140,20 +140,20 @@ |
||
| 140 | 140 | public function parse(string $tplFile): string |
| 141 | 141 | { |
| 142 | 142 | // Make sure it's a valid file, and it exists |
| 143 | - if (!\is_file($tplFile) OR !\is_readable($tplFile)) { |
|
| 143 | + if (!\is_file($tplFile) or !\is_readable($tplFile)) { |
|
| 144 | 144 | throw new \InvalidArgumentException(sprintf('"%s" does not exist or is not a file.', $tplFile)); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | $contents = \file_get_contents($tplFile); |
| 148 | 148 | |
| 149 | 149 | // Make sure it has content. file_get_contents can return 'false' on error |
| 150 | - if ($contents === '' OR $contents === false) { |
|
| 150 | + if ($contents === '' or $contents === false) { |
|
| 151 | 151 | throw new \Exception(\sprintf('"%s" does not appear to have any valid content.', $tplFile)); |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | // Process replacements |
| 155 | 155 | /** @var string $replace **/ |
| 156 | - foreach ($this->tplVars AS $find => $replace) { |
|
| 156 | + foreach ($this->tplVars as $find => $replace) { |
|
| 157 | 157 | $contents = \str_replace(\sprintf( |
| 158 | 158 | '%s%s%s', |
| 159 | 159 | $this->leftDelimiter, |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Simple Template Engine |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | </body> |
| 152 | 152 | </html> |
| 153 | -HTML); |
|
| 153 | +html); |
|
| 154 | 154 | |
| 155 | 155 | $template->assign([ |
| 156 | 156 | 'title' => 'Simple Template Engine Test', |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | </body> |
| 178 | 178 | </html> |
| 179 | -HTML, $data); |
|
| 179 | +html, $data); |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | /** |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | </body> |
| 226 | 226 | </html> |
| 227 | -HTML); |
|
| 227 | +html); |
|
| 228 | 228 | |
| 229 | 229 | $template->assign([ |
| 230 | 230 | 'title' => 'Simple Template Engine Test', |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | </body> |
| 249 | 249 | </html> |
| 250 | -HTML, $data); |
|
| 250 | +html, $data); |
|
| 251 | 251 | |
| 252 | 252 | } |
| 253 | 253 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Simple Template Engine |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | /** |
| 6 | 6 | * Simple Template Engine |