Passed
Push — master ( fdd895...8e41ed )
by Tobias
02:16
created
src/WrkLst/DocxMustache/DocxMustache.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  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)
63
+        if ($this->verbose)
64 64
             Log::error($msg);
65 65
     }
66 66
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     }
151 151
 
152
-    protected function AddContentType($imageCt="jpeg")
152
+    protected function AddContentType($imageCt = "jpeg")
153 153
     {
154 154
         //get content type file from archive
155 155
         $this->zipper->make($this->storagePath($this->local_path.$this->template_file_name))
Please login to merge, or discard this patch.
Braces   +14 added lines, -10 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()
@@ -141,8 +142,9 @@  discard block
 block discarded – undo
141 142
     protected function MustacheRender($items, $mustache_template)
142 143
     {
143 144
         $m = new \Mustache_Engine(array('escape' => function($value) {
144
-            if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value)
145
-                return str_replace('*[[DONOTESCAPE]]*', '', $value);
145
+            if (str_replace('*[[DONOTESCAPE]]*', '', $value) != $value) {
146
+                            return str_replace('*[[DONOTESCAPE]]*', '', $value);
147
+            }
146 148
             return htmlspecialchars($value, ENT_COMPAT, 'UTF-8');
147 149
         }));
148 150
         return $m->render($mustache_template, $items);
@@ -163,8 +165,9 @@  discard block
 block discarded – undo
163 165
         $ct_already_set = false;
164 166
         foreach ($ct_file as $ct)
165 167
         {
166
-            if ((string) $ct_file->Default[$i]['Extension'] == $imageCt)
167
-                $ct_already_set = true;
168
+            if ((string) $ct_file->Default[$i]['Extension'] == $imageCt) {
169
+                            $ct_already_set = true;
170
+            }
168 171
             $i++;
169 172
         }
170 173
 
@@ -290,10 +293,11 @@  discard block
 block discarded – undo
290 293
                     $img_rework = \Image::make($this->storagePath($this->local_path.'word/media/'.$imgs[$k]['img_file_src']));
291 294
                     $w = $img['width'];
292 295
                     $h = $img['height'];
293
-                    if ($w > $h)
294
-                        $h = null;
295
-                    else
296
-                        $w = null;
296
+                    if ($w > $h) {
297
+                                            $h = null;
298
+                    } else {
299
+                                            $w = null;
300
+                    }
297 301
                     $img_rework->resize($w, $h, function($constraint) {
298 302
                         $constraint->aspectRatio();
299 303
                         $constraint->upsize();
Please login to merge, or discard this patch.