Passed
Push — master ( 820633...7912aa )
by Tobias
02:32
created
src/WrkLst/DocxMustache/DocxMustache.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $this->exctractOpenXmlFile($file);
128 128
 
129
-        if($xml_object = simplexml_load_file($this->storagePath($this->local_path.$file)))
129
+        if ($xml_object = simplexml_load_file($this->storagePath($this->local_path.$file)))
130 130
         {
131 131
             return $xml_object;
132 132
         }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
     }
138 138
 
139
-    protected function saveOpenXmlFile($file,$folder,$content)
139
+    protected function saveOpenXmlFile($file, $folder, $content)
140 140
     {
141 141
         \Storage::disk($this->storageDisk)
142 142
             ->put($this->local_path.$file, $content);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         $this->log('Compact Template with Data');
161 161
 
162
-        $this->saveOpenXmlFile('word/document.xml','word',$this->word_doc);
162
+        $this->saveOpenXmlFile('word/document.xml', 'word', $this->word_doc);
163 163
         $this->zipper->close();
164 164
     }
165 165
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
     protected function MustacheRender($items, $mustache_template, $clean_tags = true)
180 180
     {
181
-        if($clean_tags)
181
+        if ($clean_tags)
182 182
             $mustache_template = $this->MustacheTagCleaner($mustache_template);
183 183
 
184 184
         $m = new \Mustache_Engine(array('escape' => function($value) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
             if ($ct_file_xml = $ct_file->asXML())
217 217
             {
218
-                $this->saveOpenXmlFile('[Content_Types].xml',false,$ct_file_xml);
218
+                $this->saveOpenXmlFile('[Content_Types].xml', false, $ct_file_xml);
219 219
             } else
220 220
             {
221 221
                 throw new Exception('Cannot generate xml for [Content_Types].xml.');
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         foreach ($imgs as $k=>$img)
365 365
         {
366 366
             //get file type of img and test it against supported imgs
367
-            if($imgageData = $this->GetImageFromUrl($img['url']))
367
+            if ($imgageData = $this->GetImageFromUrl($img['url']))
368 368
             {
369 369
                 $imgs[$k]['img_file_src'] = str_replace("wrklstId", "wrklst_image", $img['id']).$allowed_imgs[$imgageData['mime']];
370 370
                 $imgs[$k]['img_file_dest'] = str_replace("wrklstId", "wrklst_image", $img['id']).'.jpeg';
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 
432 432
         if ($rels_file_xml = $rels_file->asXML())
433 433
         {
434
-            $this->saveOpenXmlFile('word/_rels/document.xml.rels','word/_rels',$rels_file_xml);
434
+            $this->saveOpenXmlFile('word/_rels/document.xml.rels', 'word/_rels', $rels_file_xml);
435 435
         } else
436 436
         {
437 437
             throw new Exception('Cannot generate xml for word/_rels/document.xml.rels.');
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@  discard block
 block discarded – undo
60 60
     {
61 61
         //introduce logging method here to keep track of process
62 62
         // can be overwritten in extended class to log with custom preocess logger
63
-        if ($this->verbose)
64
-            Log::error($msg);
63
+        if ($this->verbose) {
64
+                    Log::error($msg);
65
+        }
65 66
     }
66 67
 
67 68
     public function cleanUpTmpDirs()
@@ -129,8 +130,7 @@  discard block
 block discarded – undo
129 130
         if($xml_object = simplexml_load_file($this->storagePath($this->local_path.$file)))
130 131
         {
131 132
             return $xml_object;
132
-        }
133
-        else
133
+        } else
134 134
         {
135 135
             throw new Exception('Cannot load XML Object from file '.$file);
136 136
         }
@@ -178,8 +178,9 @@  discard block
 block discarded – undo
178 178
 
179 179
     protected function MustacheRender($items, $mustache_template, $clean_tags = true)
180 180
     {
181
-        if($clean_tags)
182
-            $mustache_template = $this->MustacheTagCleaner($mustache_template);
181
+        if($clean_tags) {
182
+                    $mustache_template = $this->MustacheTagCleaner($mustache_template);
183
+        }
183 184
 
184 185
         $m = new \Mustache_Engine(array('escape' => function($value) {
185 186
             if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value) {
Please login to merge, or discard this patch.