@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | $mustache_template = self::TagCleaner($mustache_template); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | - $m = new \Mustache_Engine(['escape' => function ($value) { |
|
| 13 | + $m = new \Mustache_Engine(['escape' => function($value) { |
|
| 14 | 14 | if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value) { |
| 15 | 15 | $value = str_replace('&', '&', $value); |
| 16 | 16 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | return preg_replace_callback( |
| 35 | 35 | '/{{(.*?)}}/', |
| 36 | - function ($match) { |
|
| 36 | + function($match) { |
|
| 37 | 37 | return strip_tags($match[0]); |
| 38 | 38 | }, |
| 39 | 39 | preg_replace("/(?<!{){(?!{)<\/w:t>[\s\S]*?<w:t>{/", '{{', $content) |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $this->CopyTmplate(); |
| 54 | 54 | $this->getAllFilesFromDocx(); |
| 55 | - foreach($this->filelist as $file) { |
|
| 55 | + foreach ($this->filelist as $file) { |
|
| 56 | 56 | $this->doInplaceMustache($file); |
| 57 | 57 | } |
| 58 | 58 | $this->ReadTeamplate($dpi); |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | $fileWhitelist = $this->fileWhitelist; |
| 107 | 107 | $this->zipper |
| 108 | 108 | ->make($this->StoragePath($this->local_path.$this->template_file_name)) |
| 109 | - ->getRepository()->each(function ($file, $stats) use ($fileWhitelist, &$filelist) { |
|
| 110 | - foreach($fileWhitelist as $pattern) { |
|
| 111 | - if(fnmatch($pattern, $file)) { |
|
| 109 | + ->getRepository()->each(function($file, $stats) use ($fileWhitelist, &$filelist) { |
|
| 110 | + foreach ($fileWhitelist as $pattern) { |
|
| 111 | + if (fnmatch($pattern, $file)) { |
|
| 112 | 112 | $filelist[] = $file; |
| 113 | 113 | } |
| 114 | 114 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | ->getFileContent($file); |
| 123 | 123 | $tempFileContent = MustacheRender::render($this->items, $tempFileContent); |
| 124 | 124 | $tempFileContent = HtmlConversion::convert($tempFileContent); |
| 125 | - $this->zipper->addString($file,$tempFileContent); |
|
| 125 | + $this->zipper->addString($file, $tempFileContent); |
|
| 126 | 126 | $this->zipper->close(); |
| 127 | 127 | } |
| 128 | 128 | |