@@ -144,7 +144,7 @@ |
||
144 | 144 | $compiler = clone $this; |
145 | 145 | array_walk( |
146 | 146 | $this->rules, |
147 | - static function (RulesInterface $rule) use (&$tags, $compiler) { |
|
147 | + static function(RulesInterface $rule) use (&$tags, $compiler) { |
|
148 | 148 | $rule->setCompiler($compiler); |
149 | 149 | |
150 | 150 | foreach ($rule->rules() as $regex => $item) { |
@@ -20,31 +20,31 @@ |
||
20 | 20 | $compiler = $this->compiler; |
21 | 21 | |
22 | 22 | return [ |
23 | - '/\{\#(.*)\#\}/Ui' => function ($matches) { |
|
23 | + '/\{\#(.*)\#\}/Ui' => function($matches) { |
|
24 | 24 | return '<?php /*' . $matches[1] . '*/ ?>'; |
25 | 25 | }, |
26 | - '/\{set\s+(.*)\s*;?\s*\}/Ui' => function ($matches) { |
|
26 | + '/\{set\s+(.*)\s*;?\s*\}/Ui' => function($matches) { |
|
27 | 27 | return '<?php ' . $matches[1] . '; ?>'; |
28 | 28 | }, |
29 | - '/\{(elseif)\s+(.*)\}/Ui' => function ($matches) { |
|
29 | + '/\{(elseif)\s+(.*)\}/Ui' => function($matches) { |
|
30 | 30 | return '<?php }' . $matches[1] . '(' . $matches[2] . '){ ?>'; |
31 | 31 | }, |
32 | - '/\{else\/?\}/Ui' => function () { |
|
32 | + '/\{else\/?\}/Ui' => function() { |
|
33 | 33 | return '<?php }else{ ?>'; |
34 | 34 | }, |
35 | - '/\{dump\s+(.*)\s*;?\s*\}/Ui' => function ($matches) { |
|
35 | + '/\{dump\s+(.*)\s*;?\s*\}/Ui' => function($matches) { |
|
36 | 36 | return '<?php var_dump(' . $matches[1] . '); ?>'; |
37 | 37 | }, |
38 | - '/\{(foreach|if|for)\s+(.*)\}/Ui' => static function ($matches) { |
|
38 | + '/\{(foreach|if|for)\s+(.*)\}/Ui' => static function($matches) { |
|
39 | 39 | return '<?php ' . $matches[1] . '(' . $matches[2] . '){ ?>'; |
40 | 40 | }, |
41 | - '/\{(endforeach|endif|endfor)\}/Ui' => static function ($matches) { |
|
41 | + '/\{(endforeach|endif|endfor)\}/Ui' => static function($matches) { |
|
42 | 42 | return '<?php } ?>'; |
43 | 43 | }, |
44 | - '/\{\{\s?(.*)\s*;?\s?\}\}/Ui' => static function ($matches) { |
|
44 | + '/\{\{\s?(.*)\s*;?\s?\}\}/Ui' => static function($matches) { |
|
45 | 45 | return '<?php echo ' . $matches[1] . '; ?>'; |
46 | 46 | }, |
47 | - '/\{\s?extends\s*([\w\-_\.\/]*)\}/Ui' => static function ($matches) use ($compiler) { |
|
47 | + '/\{\s?extends\s*([\w\-_\.\/]*)\}/Ui' => static function($matches) use ($compiler) { |
|
48 | 48 | $templatePath = $compiler->getTemplatePath()->withFile($matches[1]); |
49 | 49 | $compilerPath = $compiler->getCompiledPath()->withFile(sprintf('%s.compiled', $matches[1])); |
50 | 50 |