Code Duplication    Length = 8-8 lines in 2 locations

src/WrkLst/DocxMustache/DocxMustache.php 2 locations

@@ 179-186 (lines=8) @@
176
            $sxe->addAttribute('Extension', $imageCt);
177
            $sxe->addAttribute('ContentType', 'image/'.$imageCt);
178
179
            if ($ct_file_xml = $ct_file->asXML())
180
            {
181
                \Storage::disk($this->storageDisk)->put($this->local_path.'[Content_Types].xml', $ct_file_xml);
182
                $this->zipper->add($this->storagePath($this->local_path.'[Content_Types].xml'));
183
            } else
184
            {
185
                throw new Exception('Cannot generate xml for [Content_Types].xml.');
186
            }
187
        }
188
    }
189
@@ 365-372 (lines=8) @@
362
363
        $this->InsertImages($ns, $imgs, $rels_file, $main_file);
364
365
        if ($rels_file_xml = $rels_file->asXML())
366
        {
367
            \Storage::disk($this->storageDisk)->put($this->local_path.'word/_rels/document.xml.rels', $rels_file_xml);
368
            $this->zipper->folder('word/_rels')->add($this->storagePath($this->local_path.'word/_rels/document.xml.rels'));
369
        } else
370
        {
371
            throw new Exception('Cannot generate xml for word/_rels/document.xml.rels.');
372
        }
373
374
        if ($main_file_xml = $main_file->asXML())
375
        {