@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | ->extractTo($this->storagePath($this->local_path), array($file), \Chumper\Zipper\Zipper::WHITELIST); |
102 | 102 | } |
103 | 103 | |
104 | - protected function ReadOpenXmlFile($file, $type="file") |
|
104 | + protected function ReadOpenXmlFile($file, $type = "file") |
|
105 | 105 | { |
106 | 106 | $this->exctractOpenXmlFile($file); |
107 | 107 | |
108 | - if($type=="file") |
|
108 | + if ($type == "file") |
|
109 | 109 | { |
110 | 110 | if ($file_contents = \Storage::disk($this->storageDisk)->get($this->local_path.$file)) |
111 | 111 | { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | $this->log('Analyze Template'); |
142 | 142 | //get the main document out of the docx archive |
143 | - $this->word_doc = ReadOpenXmlFile('word/document.xml','file'); |
|
143 | + $this->word_doc = ReadOpenXmlFile('word/document.xml', 'file'); |
|
144 | 144 | |
145 | 145 | $this->log('Merge Data into Template'); |
146 | 146 | $this->word_doc = $this->MustacheRender($this->items, $this->word_doc); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | protected function AddContentType($imageCt = "jpeg") |
186 | 186 | { |
187 | - $ct_file = $this->ReadOpenXmlFile('[Content_Types].xml','object'); |
|
187 | + $ct_file = $this->ReadOpenXmlFile('[Content_Types].xml', 'object'); |
|
188 | 188 | |
189 | 189 | if (!($ct_file instanceof \Traversable)) { |
190 | 190 | throw new Exception('Cannot traverse through [Content_Types].xml.'); |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $imgs = $replaceableImage['imgs']; |
424 | 424 | $imgs_replaced = $replaceableImage['imgs_replaced']; |
425 | 425 | |
426 | - $rels_file = $this->ReadOpenXmlFile('word/_rels/document.xml.rels','object'); |
|
426 | + $rels_file = $this->ReadOpenXmlFile('word/_rels/document.xml.rels', 'object'); |
|
427 | 427 | |
428 | 428 | $this->RemoveReplaceImages($imgs_replaced, $rels_file); |
429 | 429 |